debug
Skill1 starsChanged 2 days agoMITView on GitHub
Read-only local debugging workflow for failing tests, local errors, Rails runner investigations, logs, stack traces, and confusing app behavior. Use when asked to debug, investigate, find, explain, reproduce, or verify a local development issue. Runs only read-only commands by default. A local mutating Rails command may run only when the user explicitly asks to run that specific mutation; permission is one-shot and immediately returns to read-only.
191 other projects use a version of this.
Adopted by
Most recently taken up by
- NVIDIA/Model-Optimizertheir own version, first seen Nov 15, 2026
- shivasaini04/nanocrewtheir own version, first seen Nov 15, 2026
- markmhendrickson/neotomatheir own version, first seen Nov 15, 2026
- automagik-si/omnitheir own version, first seen Nov 15, 2026
- alexj11324/Mikkatheir own version, first seen Nov 15, 2026
- PeanutGT/NutsSkillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use add-discord, add-slack 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.
MicrosoftSkilladd-discord
Add Discord bot channel integration via Chat SDK.
Also in 11 projects that use this
MicrosoftSkilladd-slack
Add Slack channel integration via Chat SDK.
Also in 11 projects that use this
- +10 more from microsoft
Other versions191 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 191
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- anthropics/knowledge-work-plugins★ 36ksame name
- gavrielc/nanoclaw★ 31ksame name
- nanocoai/nanoclaw★ 31ksame name
- qwibitai/nanoclaw★ 31ksame name
- openai/symphony★ 27ksame name
- FalkorDB/FalkorDB★ 10ksame name
- NVIDIA/Model-Optimizer★ 5.6ksame name
- NVIDIA/TensorRT-Model-Optimizer★ 5.6ksame name
181 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- code-reviewSkill
- commitSkill
- create-planSkill
- feature-spec-breakdownSkill
- grill-with-docsSkill
- prod-debugSkill
- pr-reviewSkill
- qa-reviewSkill
- review-triageSkill
- simplify-codeSkill
- to-feature-specSkill
- writing-for-humansSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
40 rules. 0 are common, 33 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
33
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill for local development debugging where the agent may run commands, inspect runtime behavior, and gather evidence, but must …
- Distinctive: line 10
Default stance: run local read-only investigation commands yourself when useful.
- Distinctive: line 14
Read-only task until user explicitly says code changes or implementation are allowed.
- Distinctive: line 15
Run or generate only read-only commands by default.
- Distinctive: line 16
Do not edit code, config, migrations, seeds, scripts, docs, tests, lockfiles, or generated files.
- Distinctive: line 17
Do not run formatters, autofixers, code generators, migrations, seeds, backfills, destructive rake tasks, or cleanup tasks.
- Very specific: line 18
Do not run commands that create/edit/delete persistent DB data, enqueue jobs, send emails/webhooks, mutate cache, call external write APIs, …
- Very specific: line 19
Do not use Rails/ActiveRecord mutators such as save, update, create, destroy, delete, insert, upsert, touch, increment!, deliver_now, or …
- Distinctive: line 20
Treat indirect writes as writes.
- Distinctive: line 21
Do not start long-running servers, workers, watchers, or interactive consoles unless the user explicitly asks.
- Distinctive: line 22
If unsure whether a command mutates state, do not run it.
- Distinctive: line 28
Do not infer authorization from “fix it,” implementation approval, prior mutation approval, or a request to investigate.
- Distinctive: line 31
Do not broaden it into migrations, rake tasks, shell commands, retries, cleanup, follow-up mutations, or additional records.
- Distinctive: line 32
After that single execution attempt, immediately restore the read-only command boundary.
- Distinctive: line 34
Never apply this exception to production or staging.
- Very specific: line 40
Read and search local code/docs/logs.
- Distinctive: line 42
Run bounded read-only shell commands.
- Distinctive: line 43
Run focused diagnostics that do not alter source files or persistent data.
- Distinctive: line 44
Run Rails runner with query-only snippets only after verifying the local environment and boot/initializer behavior.
- Distinctive: line 45
Run read-only database queries through app APIs when bounded by IDs/time ranges/limits.
- Distinctive: line 67
Search relevant classes, controllers, jobs, serializers, services, models, scopes, callbacks, tests, and logs.
- Distinctive: line 68
Check recent git diff/log only if useful.
- Distinctive: line 69
Before claiming frontend/backend parity, find duplicate implementations and compare the relevant callers, inputs, and conditions.
- Distinctive: line 75
Prefer the smallest safe command.
- Distinctive: line 77
If no safe reproduction exists, report that limit and request a redacted artifact.
- Distinctive: line 78
Update hypothesis status from results.
- Distinctive: line 80
Use Rails runner when app state inspection helps:
- Distinctive: line 81
Run it yourself only against local development/test environment.
- Distinctive: line 82
Keep snippet query-only and bounded unless the current user message explicitly authorizes one specific local Rails mutation under the …
- Very specific: line 83
Prefer primitive output via pluck, pick, ids, count, exists?, where, select, limit, order, find_by, and readonly.
- Distinctive: line 84
If the user explicitly requests a local Rails mutation:
- Distinctive: line 99
When needing local Rails data, generate and run snippets that:
- Distinctive: line 101
Only read data, unless the current user message explicitly requests one specific local mutation under the one-shot exception.
- Distinctive: line 102
Avoid callbacks and app methods with possible side effects.
- Distinctive: line 103
Prefer direct ActiveRecord query methods and primitive columns.
- Very specific: line 104
Avoid loading huge records.
- Very specific: line 105
Treat readonly and reading roles as defense in depth, not a sandbox for arbitrary app methods.
- Very specific: line 106
Avoid inspect on large objects or objects with expensive methods.
- Distinctive: line 107
Avoid external service clients.
- Distinctive: line 119
If app supports read replica roles locally, prefer:
“Common” is measured: kept by at least 6 in 10 of the 175 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Debug
Use this skill for local development debugging where the agent may run commands, inspect runtime behavior, and gather evidence, but must not modify code or persistent state before implementation is authorized.
Default stance: run local read-only investigation commands yourself when useful. Do not edit files, change configuration, migrate databases, seed data, enqueue jobs, or mutate persistent local state until the user explicitly says to start implementing. Implementation approval does not authorize a state-mutating command.
Hard Safety Rules
- Read-only task until user explicitly says code changes or implementation are allowed.
- Run or generate only read-only commands by default.
- Do not edit code, config, migrations, seeds, scripts, docs, tests, lockfiles, or generated files.
- Do not run formatters, autofixers, code generators, migrations, seeds, backfills, destructive rake tasks, or cleanup tasks.
- Do not run commands that create/edit/delete persistent DB data, enqueue jobs, send emails/webhooks, mutate cache, call external write APIs, or trigger side effects, except for the one-shot local Rails exception below.
- Do not use Rails/ActiveRecord mutators such as
save,update,create,destroy,delete,insert,upsert,touch,increment!,deliver_now, orperform_later, except for the one-shot local Rails exception below. - Treat indirect writes as writes. Avoid callbacks, tracking, audit logs, counters, timestamps, network writes, and job enqueues.
- Do not start long-running servers, workers, watchers, or interactive consoles unless the user explicitly asks.
- If unsure whether a command mutates state, do not run it. Ask or choose a safer command.
One-shot local Rails mutation exception
Apply this exception only when the user explicitly asks the assistant to run a specific Rails command that changes local state.
- Do not infer authorization from “fix it,” implementation approval, prior mutation approval, or a request to investigate.
- Require a concrete target and intended change. If scope or side effects are unclear, ask before running anything.
- State the exact mutation and environment before execution. Run only that requested Rails command, once.
- Do not broaden it into migrations, rake tasks, shell commands, retries, cleanup, follow-up mutations, or additional records.
- After that single execution attempt, immediately restore the read-only command boundary. Verification must be read-only.
- Require a new explicit user request for every additional mutating command.
- Never apply this exception to production or staging.
Allowed Local Actions
Allowed before implementation approval:
- Read and search local code/docs/logs.
- Inspect git status, diff, log, and blame.
- Run bounded read-only shell commands.
- Run focused diagnostics that do not alter source files or persistent data.
- Run Rails runner with query-only snippets only after verifying the local environment and boot/initializer behavior. A read-looking snippet does not make application startup side-effect-free.
- Run read-only database queries through app APIs when bounded by IDs/time ranges/limits.
Ask first when a command may alter persistent state, depend on external services, take a long time, or produce large output. Tests/builds may write caches, coverage, fixtures, or databases; do not assume they are read-only. Redact secrets and personal data from commands, logs, and reported results.
Goal
Find likely cause from local error/symptom, explain evidence, and propose a fix plan. Do not implement the fix until user says it is OK to code.
Work context
Read relevant work artifacts in the repository's work area, shared by all worktrees: <work-area> = ~/.agent-work/<repo-key>/, where <repo-key> is the name of the git rev-parse --path-format=absolute --git-common-dir directory, or its parent's name when that is .git/.bare, without a trailing .git. If <work-area>/.repo names another repository, stop and ask. Layout: work/<work-id>/spec.md (requirements), work/<work-id>/plan.md (design), shared context/ (glossaries) and decisions/ (ADRs). Read selected spec/plan status, acceptance criteria, non-goals and testing decisions; verify reciprocal links and Work-ID. Use only an explicit user path, current-session confirmation, or validated reciprocal link for selection. Otherwise shortlist titles/statuses/summaries and ask via question tool, even with one candidate, including Other / None—standalone work. Never select by filename, slug, branch, or recency; if asking is unavailable, report the blocker. Clarify broken links or conflicting requirements. No documents is valid for ordinary diagnosis; do not create them or modify artifacts in this read-only workflow. Pass confirmed paths/constraints to workers; missing identity returns a clarification request, not a guess. Selection does not authorize implementation.
Workflow
- Restate boundary: read-only local investigation, no implementation yet.
- Collect inputs:
- Error message/stack trace
- Command/test that failed
- Relevant IDs, params, fixture names, or timestamps
- Expected vs actual behavior; separate supplied observations from assumptions
- Recent diff/commit if relevant
- Inspect code read-only:
- Search relevant classes, controllers, jobs, serializers, services, models, scopes, callbacks, tests, and logs.
- Check recent git diff/log only if useful.
- Before claiming frontend/backend parity, find duplicate implementations and compare the relevant callers, inputs, and conditions; one matching function is insufficient.
- Form hypotheses:
- Map stack trace to code path and identify data assumptions.
- Rank plausible causes with evidence for/against and one read-only check that could disprove each; do not invent alternatives just to meet a count.
- Reproduce or observe locally with safe commands:
- Seek a fast, repeatable signal for the exact reported symptom, not merely successful startup.
- Prefer the smallest safe command; record invocation, observed result, and expected result.
- Bound runtime and output. Minimize inputs one at a time without changing persistent state.
- If no safe reproduction exists, report that limit and request a redacted artifact; do not add instrumentation or fabricate verification.
- Update hypothesis status from results. Label conclusions VERIFIED or INFERRED and cite evidence type: code inspection, runtime observation, or user-supplied output.
- Code inspection verifies what the cited code says, not that the reported behavior occurred. Do not claim a confirmed runtime root cause or "not reproducible" from code reading alone.
- Use Rails runner when app state inspection helps:
- Run it yourself only against local development/test environment.
- Keep snippet query-only and bounded unless the current user message explicitly authorizes one specific local Rails mutation under the one-shot exception.
- Prefer primitive output via
pluck,pick,ids,count,exists?,where,select,limit,order,find_by, andreadonly.
- If the user explicitly requests a local Rails mutation:
- Apply only the one-shot exception above.
- Report whether that one execution succeeded, failed, or was not attempted.
- Return to read-only checks immediately.
- Final output:
bug:concise conclusion labeled VERIFIED or INFERRED; leave cause unresolved when evidence is insufficient.evidence:bullets with commands/files.verify:read-only checks already run or still useful.fix plan:implementation options.next:ask user if ready to start implementing.
Rails Runner Rules
Before preparing any Rails snippet or SQL query, verify columns and types against db/schema.rb or db/structure.sql, and associations, scopes, methods, and enum meanings against their definitions. Cite checked file paths/lines. Never guess names or treat an integer/enum as a boolean. If definitions are unavailable or deployed schema parity is uncertain, state the gap and request the missing definition or a bounded read-only schema check before using it.
When needing local Rails data, generate and run snippets that:
- Only read data, unless the current user message explicitly requests one specific local mutation under the one-shot exception.
- Avoid callbacks and app methods with possible side effects.
- Prefer direct ActiveRecord query methods and primitive columns.
- Avoid loading huge records. Bound by IDs/time ranges and result limits; a small result does not guarantee a cheap query (especially
countor sorting). - Treat
readonlyand reading roles as defense in depth, not a sandbox for arbitrary app methods. - Avoid
inspecton large objects or objects with expensive methods. Prefer hashes of primitive values. - Avoid external service clients.
- For read-only snippets, avoid writes even inside transactions. Rollback is not enough if code has non-DB side effects.
Example:
bin/rails runner '# READ ONLY: local debug. Query-only; no writes, no jobs, no external calls.
rows = Order.where(id: [123, 456]).limit(10).pluck(:id, :status, :created_at)
puts rows.map { |id, status, created_at| { id: id, status: status, created_at: created_at }.inspect }
nil'If app supports read replica roles locally, prefer:
bin/rails runner '# READ ONLY: local debug. No writes, no jobs, no external calls.
ActiveRecord::Base.connected_to(role: :reading) do
rows = Order.where(id: [123, 456]).limit(10).pluck(:id, :status, :created_at)
puts rows.map { |id, status, created_at| { id: id, status: status, created_at: created_at }.inspect }
end
nil'Prohibited Output
Do not present or run a mutation command as a quick fix during investigation. If a data repair, migration, code change, or test update may be needed, describe it conceptually. Only run a local mutating Rails command after the user explicitly requests that specific execution; that permission expires after one attempt.
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
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.

