repo-setup
/repo-setup
Set up or refactor a repository so agents naturally follow its intended architecture and important mistakes fail mechanically. Use when the user invokes $repo-setup, asks to make a repo agent-friendly, or wants important repository rules enforced through structure, types, tooling, tests, or CI.
- Author
- minghinmatthewlam ↗
- Repository
- agent-guards ↗
- Licence
- MIT
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Set up or refactor a repository so agents naturally follow its intended architecture and important mistakes fail mechanically. Use when the user invokes $repo-setup, asks to make a repo agent-friendly, or wants important repository rules enforced through structure, types, tooling, tests, or CI.
Original author description
Set up or refactor a repository so agents naturally follow its intended architecture and important mistakes fail mechanically. Use when the user invokes $repo-setup, asks to make a repo agent-friendly, or wants important repository rules enforced through structure, types, tooling, tests, or CI.
How it works
- Understand The Repository
- Establish The Contract
- Make The Correct Path Easy
- Prove Each New Constraint
- Learn From Failures
- Report
- Gotchas
SKILL.md preview
--- name: repo-setup description: "Set up or refactor a repository so agents naturally follow its intended architecture and important mistakes fail mechanically. Use when the user invokes $repo-setup, asks to make a repo agent-friendly, or wants important repository rules enforced through structure, types, tooling, tests, or CI." --- # Repo Setup Agents take shortcuts and copy nearby patterns. Shape the repository so the shortest, most obvious implementation follows the intended architecture. Make important wrong paths impossible or fail early instead of relying on reminders. ## Understand The Repository Read the source, build and test entrypoints, CI, static-analysis configuration, and existing instructions. Trace representative product flows to learn: - where a new feature naturally belongs; - which modules can change persistent state; - which shortcuts or recurring mistakes would be costly; - where external data is validated; - which local command proves a change is safe. Separate the architecture the code currently has from the architecture the user actually wants. Present a concise mental model and the important choices before making judgment-heavy or broad structural changes. Ask only questions that can materially change the product or architecture. ## Establish The Contract Agree on the important rules for the repository. Focus on rules that prevent real confusion, coupling, or recurring mistakes, such as: - one obvious place to add each kind of feature; - one clear module or API that writes each persistent value; - simple code paths that make important invariants hard to bypass; - validation at external boundaries rather than scattered through the system; - one canonical local verification command that CI also runs. Do not copy another repository's layout blindly. Use its principles only when they fit this product and codebase. ## Make The Correct Path Easy Remove misleading, duplicate, and bypass paths when safe. Prefer the strongest proportional mechanism that fits the rule: 1. code structure, data models, or types that make the mistake impossible; 2. dependency rules, lint, or static analysis that fail the build; 3. one canonical API, helper, generator, or extension convention; 4. focused tests or runtime checks; 5. written instructions only when the decision requires human judgment. Avoid speculative frameworks, broad compatibility layers, growing allowlists, and suppressions that hide existing violations. Improve the highest-value constraints first and keep the system easy to understand. ## Prove Each New Constraint Do not only show that normal code still works. Choose a real shortcut, past failure, or likely high-impact mistake from this repository. Reproduce the smallest safe example and show that the new structure or check rejects it with a clear failure. Remove the temporary violation, run the normal path again, and confirm that CI executes the same guard. Keep temporary violations out of the final change. ## Learn From Failures After an agent mistake or user correction, fix the immediate problem and ask: "Did the repository make this mistake easy?" If recurrence would be material, strengthen the owning structure or check and prove it catches the same class of failure. Do not add machinery for harmless one-off judgment errors. ## Report Use `concisely`. Explain the before-and-after mental model, enforced rules, commands and evidence, decisions made with the user, remaining prose-only constraints, and residual risk. ## Gotchas - Do not treat the nearest existing pattern as the intended architecture. - Do not add import or package-boundary rules unless this repository needs them. - Do not encode an architectural choice before the user understands and accepts it. - Do not claim a guard works without showing it reject a representative violation. - Do not replace a simple repository with a complicated enforcement framework. - Do not leave both the new canonical path and the old shortcut in place by default.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · minghinmatthewlam/agent-guards | 100 | MIT |
| lxsmnsyc/agent-skills | 100 | MIT |
| getgithard/githard | 100 | MIT |
| SVN11X/skills | 98 | MIT |
| smarzban/agent-skills | 90 | MIT |
Database snapshot: 13.11.2026 · package version e20d1deff1ea (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100agent-first-repo
Structure a repository and its documentation so AI coding agents can work effectively. Covers knowledge hierarchy, progressive disclosure, mechanical enforcement of architecture, and entropy management. Use when setting up a new project for agent-first development, refactoring a… - 100create-agents-md
Use when the user asks to create AGENTS.md, generate agent instructions for a repository, set up CLAUDE.md, or wants to document project conventions for coding agents. Also use when user says "create agents md", "setup agent docs", or "initialize repo for agents". - 100agents-correct
Find the mistakes agents keep repeating in a repo and make each one impossible, trying architecture first, then types, lint, tests, and docs last. Use when the operator keeps correcting the same mistake, or for /agents-correct. - 100repo-conventions
Use when the user wants a repository's architecture, API style, or testing conventions written down or updated, or asks which conventions to follow in a repository. - 95agents-contributing-setup-repo
Set up a repository to receive help from AI agents under the AGENTS-CONTRIBUTING spec. Use when a repository owner asks to accept agent contributions, add AGENTS-CONTRIBUTING.md, or open their repo to donated AI capacity. - 100agentic-setup
Sets up or upgrades a repository for AI coding agents (Claude Code, Codex, Cursor) with current best practices — AGENTS.md as an index, topic docs, a decision log, shared skills, PR-template hooks, CI with required checks, branch protection and deploy-from-main. Use when the…