hk-arch-audit
Skill100 starsChanged 9 months agoMITView on GitHub
Run comprehensive agent-native architecture review with scored principles. Audits a codebase against 8 agent-native architecture principles (Action Parity, Tools as Primitives, Context Injection, Shared Workspace, CRUD Completeness, UI Integration, Capability Discovery, Prompt-Native Features) by launching parallel sub-agents and producing a scored report. Use when the user wants to evaluate how agent-friendly their architecture is, or audit specific principles. Triggers on: 'agent native audit', 'architecture review', 'how agent-friendly is this', or /hk-arch-audit.
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-autonomy-auditSkill
- hk-breadcrumb-creatorSkill
- hk-changelogSkill
- hk-compoundSkill
- hk-follow-breadcrumbSkill
- hk-local-diagnoseSkill
- 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
6 rules. About 0 are common, 3 are distinctive, and 3 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Read references/agent-prompts.md in this skill's directory to get the detailed prompt for each sub-agent.
- Very specific: line 38
If $ARGUMENTS specifies a single principle, only run that one sub-agent.
- Distinctive: line 58
Check compliance against the principle
- Very specific: line 62
Read references/agent-prompts.md for the exact prompt to give each agent.
- Distinctive: line 66
After all agents complete, compile the summary using this template:
- Distinctive: line 103
All 8 sub-agents complete their audits (or the single requested one)
≈ “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-arch-audit — Agent-Native Architecture Review
Conducts a comprehensive review of the codebase against agent-native architecture principles, launching parallel sub-agents for each principle and producing a scored report.
Context
<audit_context> $ARGUMENTS </audit_context>
Core Principles
| # | Principle | One-liner |
| 1 | Action Parity | Whatever the user can do, the agent can do |
| 2 | Tools as Primitives | Tools provide capability, not behavior |
| 3 | Context Injection | System prompt includes dynamic context about app state |
| 4 | Shared Workspace | Agent and user work in the same data space |
| 5 | CRUD Completeness | Every entity has full Create, Read, Update, Delete |
| 6 | UI Integration | Agent actions immediately reflected in UI |
| 7 | Capability Discovery | Users can discover what the agent can do |
| 8 | Prompt-Native Features | Features are prompts defining outcomes, not code |
Workflow
Step 1: Load reference material
Read references/agent-prompts.md in this skill's directory to get the detailed prompt for each sub-agent. That file contains the exact instructions, search strategies, and output format for all 8 principle audits.
Step 2: Check for single-principle audit
If $ARGUMENTS specifies a single principle, only run that one sub-agent. Valid argument forms:
| Argument | Principle |
action parity or 1 | Action Parity |
tools or primitives or 2 | Tools as Primitives |
context or injection or 3 | Context Injection |
shared or workspace or 4 | Shared Workspace |
crud or 5 | CRUD Completeness |
ui or integration or 6 | UI Integration |
discovery or 7 | Capability Discovery |
prompt or features or 8 | Prompt-Native Features |
For single-principle audits, run one Explore sub-agent and present its findings directly — no summary table needed.
Step 3: Launch parallel sub-agents
Launch 8 parallel sub-agents using the Task tool with subagent_type: Explore, one per principle. Each agent should:
- Enumerate all relevant instances in the codebase (user actions, tools, contexts, data stores, etc.)
- Check compliance against the principle
- Provide a specific score in
X out of Y (percentage%)format - List specific gaps and recommendations
Read references/agent-prompts.md for the exact prompt to give each agent. Pass the full agent prompt from that file — don't summarize it.
Step 4: Compile summary report
After all agents complete, compile the summary using this template:
## Agent-Native Architecture Review: [Project Name]
### Overall Score Summary
| Core Principle | Score | Percentage | Status |
|----------------|-------|------------|--------|
| Action Parity | X/Y | Z% | STATUS |
| Tools as Primitives | X/Y | Z% | STATUS |
| Context Injection | X/Y | Z% | STATUS |
| Shared Workspace | X/Y | Z% | STATUS |
| CRUD Completeness | X/Y | Z% | STATUS |
| UI Integration | X/Y | Z% | STATUS |
| Capability Discovery | X/Y | Z% | STATUS |
| Prompt-Native Features | X/Y | Z% | STATUS |
**Overall Agent-Native Score: X%**
### Status Legend
- Excellent (80%+)
- Partial (50-79%)
- Needs Work (<50%)
### Top 10 Recommendations by Impact
| Priority | Action | Principle | Effort |
|----------|--------|-----------|--------|
### What's Working Well
[List top 5 strengths]Success criteria
- All 8 sub-agents complete their audits (or the single requested one)
- Each principle has a specific numeric score (X/Y format)
- Summary table shows all scores and status indicators
- Top 10 recommendations are prioritized by impact
- Report identifies both strengths and gaps
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.

