ワンクリックで
repo-bootstrap
Bootstrap repository governance by creating AGENTS.md and a standard set of SKILL.md files.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Bootstrap repository governance by creating AGENTS.md and a standard set of SKILL.md files.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Validate Python code blocks in Markdown documentation using pytest-codeblock.
Migrate Python repositories from mypy to ty for static type checking.
Create and modify repository-specific SKILL.md policy files in strict compliance with AGENTS.md and existing project skills.
Migrate Python repositories from virtualenv, virtualenvwrapper, pip-tools, requirements files, setup.py, or setup.cfg to a uv-managed pyproject.toml and uv.lock workflow.
Keep project documentation aligned with code by detecting and auto-fixing mismatches using agent-based analysis.
| name | repo-bootstrap |
| description | Bootstrap repository governance by creating AGENTS.md and a standard set of SKILL.md files. |
This skill bootstraps agent-operable governance for a repository.
When invoked, it creates:
AGENTS.mdSKILL.md files, each with a single responsibilityYou must follow the phases below in order. You must not invent project details.
This skill is concerned only with governance files:
AGENTS.md.agents/skills/**/SKILL.mdIt must not modify source code, configuration, or dependencies.
This skill MUST behave additively.
If a required governance file or skill directory already exists, you MUST NOT regenerate, overwrite, or modify it.
Instead:
Existing AGENTS.md and existing SKILL.md files are authoritative
and must be preserved exactly.
Before creating any files, perform a read-only scan of the repository.
Look for facts that are already true, including:
make, npm, uv, etc.)Read, if they exist:
READMEIf the project is Python-based, you MUST determine the canonical way to invoke
tools before writing any SKILL.md files. Do this by reading Makefile and
pyproject.toml:
Locate the test target — find the test: target (or equivalent) in the
Makefile. Extract the exact command used to run tests (e.g. uv run pytest,
poetry run pytest, python -m pytest, pytest).
Identify the runtime prefix — check whether uv run, poetry run,
a virtualenv activation pattern, or bare calls are used across Makefile targets
for lint, test, and build. Count occurrences: if the majority of tool
invocations use a prefix (e.g. uv run), that prefix is mandatory.
Detect pre-commit configuration — check whether .pre-commit-config.yaml
exists at the repository root.
Record these facts for use in Phase 3:
TEST_COMMAND: exact command from the test targetRUNTIME_PREFIX: prefix required before tool names (or "none" if bare calls)RUNTIME_MANAGER: uv, poetry, pip, virtualenv, or otherPRE_COMMIT_CONFIGURED: true if .pre-commit-config.yaml exists, else falseIf a fact is not clearly observable, treat it as unknown and omit it.
Do not infer:
Create AGENTS.md at the repository root.
AGENTS.md defines:
It must not define workflows or procedures.
Create AGENTS.md with these sections, in this order:
# AGENTS.md — <Project Name>
## Project overview
## Architecture invariants
## Repository layout (authoritative)
## Hard constraints
## Known intentional behaviors — do not change
## Configuration authority
## Mandatory workflow (every task, non-negotiable)
## Skills index
## Agent obligations
## Mandatory workflow — that section is explicitly procedural by designThis is the most important section. Skills are separate files that agents must proactively read — they are often skipped. The mandatory workflow must be inline in AGENTS.md so it is always seen on first read.
Populate it using TEST_COMMAND, RUNTIME_PREFIX, and RUNTIME_MANAGER
detected in Phase 1. Use real commands, not placeholders.
Template (adapt to actual detected commands):
## Mandatory workflow (every task, non-negotiable)
**Step 0 — Test decision:** Before writing any code, decide: does this task
change behaviour, add API surface, or touch edge cases? If yes, write or update
tests first (or alongside). Never skip this decision.
- **Bug fix sub-rule:** Write a regression test that reproduces the bug first.
Run it — it must fail. Fix the bug. Confirm the test now passes.
- **Test types:** When writing tests, cover three types: (1) unit test for the
specific component, (2) integration test verifying system-level behaviour,
(3) happy-path test confirming no regression in the existing working flow.
**Step 1 — Lint:** <lint command(s) from Makefile or detected linter>
**Step 2 — Fix lint errors, then repeat Step 1.**
**Step 3 — Test:** <TEST_COMMAND from Phase 1>
<if single-file variant exists, show it here>
**Step 4 — Fix failures, then repeat Step 3.**
**Step 5 — Run lint once more** to catch regressions introduced by fixes.
Maximum 3 lint → test iterations. After 3, stop and report.
**Step 6 — Documentation gate:** If you changed public API, CLI flags, or
default limits, run the `update-documentation` skill. It scans code vs docs
and auto-fixes misalignments.
**Step 7 — Pre-commit gate:**
<If PRE_COMMIT_CONFIGURED is true:>
```bash
pre-commit run --all-files
```
<If PRE_COMMIT_CONFIGURED is false:>
Run all lint commands individually (as in Step 1) to serve as the final gate.
<If RUNTIME_PREFIX is set, add:>
**Runtime rule — ALWAYS use `<RUNTIME_PREFIX>`.** Never call `python`,
`python3`, or any project tool directly — they will resolve to the wrong
Python or missing dependencies. Every tool invocation must use `<RUNTIME_PREFIX>`.
Rules:
TEST_COMMAND extracted from Phase 1 (e.g. uv run pytest -vrx -s)make wrapper exists, show both: make test # uv run pytest -vrx -sRUNTIME_PREFIX is set, the runtime rule paragraph is MANDATORYRUNTIME_PREFIX is “none”, omit the runtime rule paragraphPRE_COMMIT_CONFIGURED is true, Step 7 uses pre-commit run --all-filesPRE_COMMIT_CONFIGURED is false, Step 7 re-runs all detected lint commandsAfter creating all SKILL.md files in Phase 3, populate ## Skills index in
AGENTS.md. Its purpose is to point to detailed skill files — not to replace
the mandatory workflow which is already inline above.
Format:
## Skills index
Detailed skill files live in `.agents/skills/<name>/SKILL.md`. Read the
relevant file for full guidance:
| Skill | When to read |
|-------|--------------|
| `dev-setup` | Environment setup or dependency troubleshooting |
| `dev-workflow` | Full Definition of Done and retry logic |
| `coding-standards` | Style, typing, and naming rules |
| `pr-review` | Pull request review checklist |
| `update-documentation` | API, CLI, or behaviour changes |
Rules for populating the table:
Create the following directories and files:
.agents/skills/
├── dev-setup/
│ └── SKILL.md
├── dev-workflow/
│ └── SKILL.md
├── coding-standards/
│ └── SKILL.md
├── pr-review/
│ └── SKILL.md
├── update-documentation/
│ └── SKILL.md
Each SKILL.md must be valid, self-contained, and have a single responsibility.
Every SKILL.md file you create MUST start with a YAML frontmatter header in the following exact format:
---
name: <skill-name>
description: <concise description of the skill’s purpose>
---
Focus:
Include:
The first section of dev-setup/SKILL.md MUST be a “Tool Invocation Rules”
section. Its content depends on what Phase 1 detected:
If RUNTIME_PREFIX = uv run (Makefile uses uv run pervasively):
Write a section titled ## Tool Invocation Rules (MANDATORY) that:
uv run.”TEST_COMMAND from Phase 1).python, python3, and
every tool that the Makefile invokes via uv run (e.g. pytest, ruff,
doc8). These are forbidden because bare calls use the wrong Python version
or missing dependencies — uv run resolves both automatically.If RUNTIME_PREFIX = poetry run:
Write the same section adapted to poetry run. List the same forbidden bare
invocations.
If RUNTIME_PREFIX = “none” (bare calls, virtualenv assumed active):
Write a section titled ## Tool Invocation Rules that:
If runtime is ambiguous:
Omit the forbidden list. Document only what was directly observed.
This section must appear before any setup steps so it cannot be missed.
Exclude:
This file defines the Definition of Done. It is non-negotiable: every task MUST follow it completely. No step may be skipped for any reason.
It must include:
Every task starts with a test decision. Include this as the first step:
Step 0 — Test decision: Before writing any code, decide:
- Does this task change or add public API, behavior, or edge cases?
- If yes, write or update tests first (or alongside the implementation).
- If no, justify explicitly why no new tests are needed.
Bug fix sub-rule: Write a regression test that reproduces the bug before implementing the fix. Run it — it must fail. Then fix the bug and confirm the test passes.
Test types: When writing tests, cover all three:
- Unit test — targets the specific function or class being changed
- Integration test — verifies system-level behaviour end-to-end
- Happy-path test — confirms the existing working flow has not regressed
Never declare a task complete without having made this decision consciously.
State explicitly that this sequence is mandatory for every task without exception. No task is “too small” or “too obvious” to skip it.
Include:
update-documentation skillPRE_COMMIT_CONFIGURED is true: pre-commit run --all-filesPRE_COMMIT_CONFIGURED is false: re-run all detected lint commandsUse TEST_COMMAND and RUNTIME_PREFIX from Phase 1 to write the exact commands
in the mandatory sequence. Do not write placeholder commands.
If RUNTIME_PREFIX is set (e.g. uv run), each command in the sequence MUST
either use a make target OR show the direct prefixed equivalent inline as a
comment (e.g. make test # = uv run pytest -vrx -s).
Add a “Runtime Rule” note at the top of the sequence stating the prefix requirement. Add to Forbidden Actions: “Never call tools without the required runtime prefix.”
Always include at minimum:
This is the skill that enforces: “assess test needs first, run tests, fix linting errors, run tests again, only then finish — for every task, every time”.
Focus:
Include:
Exclude:
Focus:
Include:
Exclude:
This single skill responsibilities for:
It MUST be comprehensive and explicit.
Focus:
Include ALL of the following sections (do not omit):
Operation mode
Ground truth and authority hierarchy
Agent-based sync process (step-by-step)
Documentation files overview and targeting rules
Feature-specific documentation checklist
Code example rules (documentation-as-tests)
Validation checklist (before reporting completion)
What NOT to do
Exclude:
The output of this skill is documentation edits plus a clear change report.
If the repository does not clearly specify something:
Never guess.
You must never:
After finishing, report: