Skip to content
Skills Library
Programming · Building & coding

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.

Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

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

  1. Understand The Repository
  2. Establish The Contract
  3. Make The Correct Path Easy
  4. Prove Each New Constraint
  5. Learn From Failures
  6. Report
  7. Gotchas
Original SKILL.md headings · 83 lines, 564 words
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

RepositoryScoreLicence
This page · minghinmatthewlam/agent-guards100MIT
lxsmnsyc/agent-skills100MIT
getgithard/githard100MIT
SVN11X/skills98MIT
smarzban/agent-skills90MIT

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…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.