hk-local-diagnose
Skill100 starsChanged 9 months agoMITView on GitHub
Run diagnostic scripts on tasks, specs, boards, or reflections. Wraps testing_tools/ with proper working directory and output mode selection. Use this skill whenever the user wants to inspect, debug, or check the state of a task, spec, board, or reflection — even if they don't say 'inspect' explicitly. Triggers on: 'why did task X fail', 'show me spec Y', 'what's on the board', 'check task', 'inspect', 'diagnose', or /hk-local-diagnose.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- harness_usage_status/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- harness_usage_status/CLAUDE.mdCLAUDE.md
- odin/CLAUDE.mdCLAUDE.md
- taskit/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- fable-auditSkill
- hk-arch-auditSkill
- hk-autonomy-auditSkill
- hk-breadcrumb-creatorSkill
- hk-changelogSkill
- hk-compoundSkill
- hk-follow-breadcrumbSkill
- hk-local-logsSkill
- hk-local-run-specSkill
- hk-merge-resolveSkill
- hk-mock-firstSkill
- hk-rcaSkill
- hk-refineSkill
- hk-scout-wikiSkill
- hk-shift-changelogSkill
- hk-skill-creatorSkill
- hk-slop-auditSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Run the right diagnostic script with the right flags, from the right directory.
- Very specific: line 31
If no flags are provided, default to --brief — this is the token-efficient choice for LLM consumption.
- Very specific: line 45
All scripts run from the taskit/taskit-backend/ directory.
- Distinctive: line 71
If the script exits with a non-zero code, show the error and suggest:
- Very specific: line 72
Check that the ID exists: "Is task/spec/board {id} a valid ID?"
- Distinctive: line 73
Check that the Django app is set up: "Is the taskit-backend database accessible?"
- Very specific: line 77
If $ARGUMENTS is empty or missing the type, print usage help:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/hk-local-diagnose — Diagnostic Script Runner
Run the right diagnostic script with the right flags, from the right directory. No more remembering paths or cd-ing around.
Usage
/hk-local-diagnose task 42
/hk-local-diagnose task 42 --brief
/hk-local-diagnose spec 15 --json --sections tasks,problems
/hk-local-diagnose board
/hk-local-diagnose board 3
/hk-local-diagnose reflection 8 --full
/hk-local-diagnose snapshot sp25 ../../tests/e2e_snapshots/smokeArguments
Parse $ARGUMENTS to extract:
- type (required):
task,spec,board,reflection, orsnapshot - id (required for all except
board): the numeric ID or spec prefix - flags (optional):
--brief,--full,--json,--slim,--sections <list>
If no flags are provided, default to --brief — this is the token-efficient choice for LLM consumption. The user can always ask for --full if they need more.
Script mapping
| Type | Script | Required args |
task | task_inspect.py <id> | id |
spec | spec_trace.py <id> | id |
board | board_overview.py [id] | id optional |
reflection | reflection_inspect.py <id> | id |
snapshot | snapshot_extractor.py <id> <output_dir> | id + output_dir |
Execution
All scripts run from the taskit/taskit-backend/ directory. The working directory for execution is always:
REPO_ROOT/taskit/taskit-backend/Where REPO_ROOT is the git repository root (find it with git rev-parse --show-toplevel).
Step 1: Resolve the repo root
REPO_ROOT=$(git rev-parse --show-toplevel)Step 2: Build and run the command
cd "$REPO_ROOT/taskit/taskit-backend" && python testing_tools/<script> <id> [flags]Pass through any --brief, --full, --json, --slim, or --sections flags directly to the script.
Step 3: Display the output
Print the script output directly. Do not summarize or interpret — the scripts already produce well-structured output with problem detection built in.
If the script exits with a non-zero code, show the error and suggest:
- Check that the ID exists: "Is task/spec/board {id} a valid ID?"
- Check that the Django app is set up: "Is the taskit-backend database accessible?"
Error handling
If $ARGUMENTS is empty or missing the type, print usage help:
Usage: /hk-local-diagnose <type> <id> [flags]
Types: task, spec, board, reflection, snapshot
Flags: --brief (default), --full, --json, --slim, --sections <list>
Examples:
/hk-local-diagnose task 42
/hk-local-diagnose spec 15 --json --sections tasks,problems
/hk-local-diagnose boardDoes 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.

