agentleFS
DespensativoDespensativo/OpenWrt-Skills/.agents/skills/systematic-debugging/SKILL.md

systematic-debugging

Skill0 starsChanged 2 months agoMITView on GitHub

Use when encountering any bug, test failure, router crash, or unexpected behavior before proposing fixes. Enforces root-cause investigation, log analysis (dmesg, logread), reproducible steps, and minimal hypotheses.

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnosing-superpowers, building-chatgpt-apps and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 6 projects that use this

  • mjunaidcaSkill

    building-chatgpt-apps

    Guides creation of ChatGPT Apps with interactive widgets using OpenAI Apps SDK and MCP servers. Use when building ChatGPT custom apps with visual UI components, embedded widgets, or rich interactive experiences. Covers widget architecture, MCP server setup with FastMCP, response metadata, and Developer Mode configuration. NOT when building standard MCP servers without widgets (use building-mcp-servers skill instead).

    Also in 4 projects that use this

  • mjunaidcaSkill

    building-chat-interfaces

    Build AI chat interfaces with custom backends, authentication, and context injection. Use when integrating chat UI with AI agents, adding auth to chat, injecting user/page context, or implementing httpOnly cookie proxies. Covers ChatKitServer, useChatKit, and MCP auth patterns. NOT when building simple chatbots without persistence or custom agent integration.

    Also in 4 projects that use this

  • MorningStar0709Skill

    chinese-git-workflow

    Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".

    Also in 4 projects that use this

  • +8 more from mjunaidca

The file

Files
SKILL.md

Systematic Debugging for ARK Router & Embedded OpenWrt

Core Principle

NENHUMA ALTERAÇÃO OU CORREÇÃO SEM INVESTIGAÇÃO PRÉVIA DA CAUSA-RAIZ

Correções rápidas ou "chutes" em roteadores podem resultar em loops de reinicialização (bootloop), perda de acesso SSH/LuCI ou corrupção do /overlay.


Quando Utilizar

Ative esta skill diante de qualquer falha técnica:

  • Falhas em scripts de boot (/etc/init.d/*), Ucode ou LuCI RPC (ubus).
  • Travamentos, kernel panic ou reinicializações inesperadas da CPU (MIPS QCA9558 / MediaTek MT7981).
  • Inconsistências de rede (VLAN, PPPoE, Wi-Fi 2.4G/5G, roteamento).
  • Falhas no pipeline de build e minificação (build_minified_assets.py).
  • Erros de interface DOM no LuCI (modais que não abrem/fecham, layout quebrado em mobile).

As 4 Fases Obrigatórias

Fase 1: Coleta de Evidências e Investigação da Causa-Raiz

  1. Inspecionar Mensagens e Logs Reais:
    • Analisar dmesg para identificar mensagens do kernel (ex: OOM killer, drivers mt76/ath9k).
    • Verificar logread para logs de serviços de rede (dnsmasq, hostapd, netifd, uhttpd).
    • Inspecionar erros do console no navegador ou arquivos HTML de erro do LuCI (luci_err.html).
  2. Reproduzir o Problema:
    • Identificar o comando ou ação exata que dispara o erro.
    • Determinar se a falha é determinística ou intermitente (ex: concorrência, esgotamento de memória).
  3. Isolar Mudanças Recentes:
    • O que foi alterado recentemente no repositório (git diff) ou na partição /overlay?
    • Houve atualização de configuração UCI ou pacotes (opkg/apk)?

Fase 2: Análise de Padrões e Referência

  1. Comparar com módulos LuCI ou scripts OpenWrt que estejam funcionando perfeitamente no mesmo projeto.
  2. Ler a documentação ou código de referência por completo, sem assumir suposições.
  3. Compreender o ciclo de vida do subsistema envolvido (ubus call, uci get, dispatcher do LuCI).

Fase 3: Hipótese Única e Teste Mínimo

  1. Formular uma hipótese clara e específica: "A falha ocorre porque X produz Y na condição Z."
  2. Aplicar a menor alteração possível para testar exclusivamente essa hipótese.
  3. Não corrigir múltiplos componentes simultaneamente.

Fase 4: Validação e Prevenção de Regressão

  1. Testar o comportamento antes e depois da correção.
  2. Garantir que a alteração não aumentou o consumo de memória RAM nem gravou lixo permanente na Flash.
  3. Confirmar que o serviço afetado reiniciou de forma limpa.

Evidência por ambiente e revisão

  • Registre modelo, versão do firmware, revisão do código ou pacote, ação reproduzida e resultado observado. Separe inspeção estática, mock, navegador, VM e roteador físico.
  • Para melhorias de desempenho, meça o caminho frio e o cache aquecido sob carga comparável; informe latência e CPU em vez de prometer uma porcentagem universal.
  • Teste invalidação de cache após evento relevante e após reboot. Arquivos sob /tmp são temporários; trate ausência, timestamp inválido e escrita interrompida.
  • Um teste estrutural ou relatório gerado não confirma tráfego, recuperação após reboot ou aprovação de release.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.