From fb356b9bca3bd824075f094084183ba9ef52e4bb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 29 Jan 2026 07:02:52 +0000 Subject: [PATCH 1/4] Initial plan From b1eda6d9f54a5fe1336b6c81893ccf005070f2e7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 29 Jan 2026 07:06:00 +0000 Subject: [PATCH 2/4] Update README.md with accurate skill counts and integrations section Co-authored-by: tuanductran <69758022+tuanductran@users.noreply.github.com> --- README.md | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 122 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 95c7be9..1e2d622 100644 --- a/README.md +++ b/README.md @@ -35,23 +35,32 @@ NextDNS API integration best practices covering authentication, profile manageme | Capability | 15 | Authentication, Profile management, Security settings, Privacy settings, Parental control, Analytics queries, Time series data, Logs streaming, Error handling, Pagination | | Efficiency | 2 | Response format parsing, Logs download | -### nextdns-cli (10 rules) +### nextdns-cli (14 rules) NextDNS CLI client best practices for installation, configuration, and management of DNS-over-HTTPS proxy. | Type | Count | Examples | |:-----------|:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------| -| Capability | 8 | Installation, Daemon control, System configuration, Profile configuration, Advanced features, Monitoring, Platform-specific, Troubleshooting | -| Efficiency | 2 | Upgrade/uninstall, Best practices | +| Capability | 11 | Installation, Daemon control, System configuration, Profile configuration, Advanced features, Monitoring, Platform-specific, Troubleshooting | +| Efficiency | 3 | Upgrade/uninstall, Best practices, Docker deployment | -### nextdns-ui (8 rules) +### nextdns-ui (10 rules) NextDNS Web UI configuration and management best practices via the web dashboard. | Type | Count | Examples | |:-----------|:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------| -| Capability | 6 | Security settings, Privacy settings, Parental control, Denylist/Allowlist, Analytics & Logs, Configuration management | -| Efficiency | 2 | Setup optimization, Troubleshooting via UI | +| Capability | 7 | Security settings, Privacy settings, Parental control, Denylist/Allowlist, DDNS settings, Analytics & Logs, Configuration management | +| Efficiency | 3 | Threat modeling, Setup optimization, Troubleshooting via UI | + +### integrations (3 rules) + +NextDNS integration guides for third-party platforms and services including routers, network management, and home automation. + +| Type | Count | Examples | +|:-----------|:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------| +| Capability | 3 | DNSMasq integration, Public DNS and AdGuard Home, OpenWrt installation and troubleshooting | +| Efficiency | 0 | Future: Multi-platform deployment, Integration testing | ## Rule Types @@ -129,14 +138,33 @@ Rules are classified into two categories: - **Privacy Settings**: Blocklists and tracking protection - **Parental Control**: Advanced filtering and schedules - **Denylist/Allowlist**: Manual domain management +- **DDNS Settings**: Dynamic DNS configuration #### Monitoring & Management - **Analytics & Logs**: Identify and analyze network traffic - **Configuration Management**: Profile settings and performance +- **Threat Modeling**: Security risk assessment and mitigation - **Setup Optimization**: Best practices for dashboard setup - **Troubleshooting UI**: Debugging issues using the web interface +### NextDNS Integration Skills + +#### Platform Integration + +- **DNSMasq Integration**: Configure DNSMasq and NextDNS together while maintaining client reporting +- **Public DNS Setup**: Configure NextDNS public DNS servers on browsers and operating systems +- **AdGuard Home**: Integrate NextDNS with AdGuard Home as upstream DNS provider +- **OpenWrt**: Installation, upgrade, and troubleshooting on OpenWrt routers + +#### Supported Platforms + +- Routers: OpenWrt, pfSense, Ubiquiti UniFi, DD-WRT +- Network: DNSMasq, AdGuard Home, conditional DNS forwarding +- Automation: Home Assistant, Tailscale +- Containers: Docker, Kubernetes +- NAS: Synology, QNAP + ## Quick Examples ### API Examples @@ -227,6 +255,52 @@ nextdns cache-stats nextdns discovered ``` +### Integration Examples + +#### DNSMasq with NextDNS + +```bash +# Configure DNSMasq to use NextDNS on custom port +# In /etc/dnsmasq.conf +server=127.0.0.1#5342 +no-resolv + +# Configure NextDNS CLI to listen on port 5342 +sudo nextdns config set -listen=127.0.0.1:5342 +sudo nextdns restart +``` + +#### OpenWrt Installation + +```bash +# SSH into OpenWrt router +ssh root@192.168.1.1 + +# Install NextDNS +sh -c 'sh -c "$(curl -sL https://nextdns.io/install)"' + +# Configure profile ID +nextdns config set -profile=abc123 + +# Install and start service +nextdns install +/etc/init.d/nextdns start +/etc/init.d/nextdns enable +``` + +#### AdGuard Home Integration + +Configure NextDNS as upstream DNS in AdGuard Home settings: + +```text +# Upstream DNS Servers +https://dns.nextdns.io/abc123 + +# Bootstrap DNS Servers +1.1.1.1 +1.0.0.1 +``` + ## Methodology Every skill in this repository is created through a rigorous, evidence-based process: @@ -255,9 +329,50 @@ Skills are tested with: ## Resources +### Official Documentation + - [NextDNS API Documentation](https://nextdns.github.io/api/) -- [NextDNS Account](https://my.nextdns.io/account) +- [NextDNS CLI Wiki](https://github.com/nextdns/nextdns/wiki) - [NextDNS Help Center](https://help.nextdns.io) +- [NextDNS Account Management](https://my.nextdns.io/account) + +### Community Resources + +- [NextDNS-Config Community Guidelines](https://github.com/yokoffing/NextDNS-Config) + +## Contributing + +This repository follows strict quality standards to ensure AI agents can reliably use the skills. + +### Development Setup + +```bash +# Install dependencies +pnpm install + +# Run linting +pnpm lint + +# Fix linting issues +pnpm lint:fix +``` + +### Adding a New Rule + +1. Use the template from `templates/rule-template.md` +2. Create a new file in `skills//rules/` using kebab-case naming +3. Add required YAML frontmatter (title, impact, impactDescription, type, tags) +4. Include the H1 title followed by the bolded Impact Line +5. Add the entry to the skill's capability or efficiency table in `SKILL.md` +6. Run `pnpm lint:fix` to ensure compliance + +### Quality Requirements + +- **Language**: All content must be in English +- **Indentation**: Use 4-space indentation for lists +- **Filenames**: Use kebab-case for all rule files +- **Case Police**: Follow technical term casing (NextDNS, OpenWrt, macOS, etc.) +- **Code Blocks**: Always specify language for syntax highlighting ## License From 445d5828a80ee01f41e5a976cb8b608c558a0803 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 29 Jan 2026 07:21:02 +0000 Subject: [PATCH 3/4] feat: add GitHub Action to auto-update README with rule counts Co-authored-by: tuanductran <69758022+tuanductran@users.noreply.github.com> --- .github/workflows/auto-update-readme.yml | 211 +++++++++++++++++++++++ 1 file changed, 211 insertions(+) create mode 100644 .github/workflows/auto-update-readme.yml diff --git a/.github/workflows/auto-update-readme.yml b/.github/workflows/auto-update-readme.yml new file mode 100644 index 0000000..8d31e9e --- /dev/null +++ b/.github/workflows/auto-update-readme.yml @@ -0,0 +1,211 @@ +name: Auto Update README + +on: + push: + branches: [main] + paths: + - 'skills/**/rules/*.md' + - 'skills/**/SKILL.md' + +jobs: + update-readme: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Generate and update README + run: | + python3 << 'PYTHON_SCRIPT' + import os + import re + from pathlib import Path + from typing import Dict, List, Tuple + + def parse_yaml_frontmatter(file_path: Path) -> Dict[str, str]: + """Parse YAML frontmatter from a markdown file.""" + with open(file_path, 'r', encoding='utf-8') as f: + content = f.read() + + # Extract frontmatter between --- markers + match = re.match(r'^---\s*\n(.*?)\n---\s*\n', content, re.DOTALL) + if not match: + return {} + + frontmatter = {} + for line in match.group(1).split('\n'): + if ':' in line: + key, value = line.split(':', 1) + frontmatter[key.strip()] = value.strip() + + return frontmatter + + def get_skill_info(skill_dir: Path) -> Tuple[str, str, List[Dict]]: + """Get skill name, description and rules from a skill directory.""" + skill_md = skill_dir / 'SKILL.md' + if not skill_md.exists(): + return '', '', [] + + with open(skill_md, 'r', encoding='utf-8') as f: + skill_content = f.read() + + # Parse skill frontmatter + skill_meta = parse_yaml_frontmatter(skill_md) + skill_name = skill_meta.get('name', skill_dir.name) + skill_desc = skill_meta.get('description', '') + + # Get all rule files + rules_dir = skill_dir / 'rules' + if not rules_dir.exists(): + return skill_name, skill_desc, [] + + rules = [] + for rule_file in sorted(rules_dir.glob('*.md')): + rule_meta = parse_yaml_frontmatter(rule_file) + if rule_meta: + rules.append({ + 'file': rule_file.name, + 'title': rule_meta.get('title', rule_file.stem), + 'type': rule_meta.get('type', 'capability'), + 'impact': rule_meta.get('impact', 'MEDIUM'), + 'tags': rule_meta.get('tags', ''), + 'path': str(rule_file.relative_to(Path.cwd())) + }) + + return skill_name, skill_desc, rules + + def format_skill_section(skill_name: str, rules: List[Dict]) -> str: + """Format a skill section with its rules.""" + if not rules: + return '' + + # Count rules by type + capability_rules = [r for r in rules if r['type'] == 'capability'] + efficiency_rules = [r for r in rules if r['type'] == 'efficiency'] + + # Map skill names to display names + skill_display_names = { + 'nextdns-api': 'NextDNS API', + 'nextdns-cli': 'NextDNS CLI', + 'nextdns-ui': 'NextDNS UI', + 'integrations': 'Integrations' + } + + display_name = skill_display_names.get(skill_name, skill_name) + total_count = len(rules) + + output = f"### {skill_name} ({total_count} rules)\n\n" + + # Get description based on skill + descriptions = { + 'nextdns-api': 'NextDNS API integration best practices covering authentication, profile management, analytics, logs, and real-time streaming.', + 'nextdns-cli': 'NextDNS CLI client best practices for installation, configuration, and management of DNS-over-HTTPS proxy.', + 'nextdns-ui': 'NextDNS Web UI configuration and management best practices via the web dashboard.', + 'integrations': 'NextDNS integration guides for third-party platforms and services including routers, network management, and home automation.' + } + + output += descriptions.get(skill_name, '') + "\n\n" + + # Create table + output += "| Type | Count | Examples |\n" + output += "|:-----------|:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n" + + # Capability row + if capability_rules: + cap_examples = ', '.join([r['title'] for r in capability_rules[:8]]) + if len(capability_rules) > 8: + cap_examples += '...' + output += f"| Capability | {len(capability_rules):<5} | {cap_examples:<154} |\n" + else: + output += f"| Capability | 0 | None |\n" + + # Efficiency row + if efficiency_rules: + eff_examples = ', '.join([r['title'] for r in efficiency_rules[:8]]) + if len(efficiency_rules) > 8: + eff_examples += '...' + output += f"| Efficiency | {len(efficiency_rules):<5} | {eff_examples:<154} |\n" + else: + output += f"| Efficiency | 0 | Future additions |\n" + + output += "\n" + return output + + def main(): + """Main function to update README.md.""" + repo_root = Path.cwd() + skills_dir = repo_root / 'skills' + readme_path = repo_root / 'README.md' + + if not skills_dir.exists() or not readme_path.exists(): + print("Error: skills directory or README.md not found") + return + + # Get all skill directories + skill_order = ['nextdns-api', 'nextdns-cli', 'nextdns-ui', 'integrations'] + skills_data = {} + + for skill_dir in sorted(skills_dir.iterdir()): + if skill_dir.is_dir(): + skill_name, skill_desc, rules = get_skill_info(skill_dir) + if rules: + skills_data[skill_name] = rules + + # Generate the skills section + skills_content = "" + for skill_name in skill_order: + if skill_name in skills_data: + skills_content += format_skill_section(skill_name, skills_data[skill_name]) + + # Read README.md + with open(readme_path, 'r', encoding='utf-8') as f: + readme = f.read() + + # Find and replace content between markers + start_marker = "## Available Skills" + end_marker = "## Rule Types" + + pattern = re.compile( + f"({re.escape(start_marker)})(.*?)({re.escape(end_marker)})", + re.DOTALL + ) + + if not pattern.search(readme): + print("Error: Could not find markers in README.md") + print(f"Looking for: '{start_marker}' and '{end_marker}'") + return + + new_readme = pattern.sub( + f"\\1\n\n{skills_content}\\3", + readme + ) + + # Write back to README.md + with open(readme_path, 'w', encoding='utf-8') as f: + f.write(new_readme) + + print("✅ README.md updated successfully!") + print(f"Total skills processed: {len(skills_data)}") + for skill_name, rules in skills_data.items(): + print(f" - {skill_name}: {len(rules)} rules") + + if __name__ == '__main__': + main() + PYTHON_SCRIPT + + - name: Commit and push changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: 'docs: auto-update README.md with latest rules' + file_pattern: 'README.md' + commit_user_name: 'github-actions[bot]' + commit_user_email: 'github-actions[bot]@users.noreply.github.com' + commit_author: 'github-actions[bot] ' From 85c8c956166796b91578d9aea26c026dbc2e894e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 29 Jan 2026 07:21:43 +0000 Subject: [PATCH 4/4] fix: update git-auto-commit-action to v7 as requested Co-authored-by: tuanductran <69758022+tuanductran@users.noreply.github.com> --- .github/workflows/auto-update-readme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-update-readme.yml b/.github/workflows/auto-update-readme.yml index 8d31e9e..df5f346 100644 --- a/.github/workflows/auto-update-readme.yml +++ b/.github/workflows/auto-update-readme.yml @@ -202,7 +202,7 @@ jobs: PYTHON_SCRIPT - name: Commit and push changes - uses: stefanzweifel/git-auto-commit-action@v5 + uses: stefanzweifel/git-auto-commit-action@v7 with: commit_message: 'docs: auto-update README.md with latest rules' file_pattern: 'README.md'