skills/agent-init/SKILL.md
Creates, updates, or prunes an AGENTS.md for any repository by auditing the codebase, detecting non-discoverable gaps, and drafting minimal high-signal instructions. Triggers: AGENTS.md, agent setup, agent config, init agents, workspace setup, agent instructions, Claude setup. Uses: Read, Bash, Glob, Grep, AskUserQuestion. Outputs: AGENTS.md at repo root (or module-level for monorepos). Do NOT use for: writing README, generating docs, configuring CI, or editing code.
npx skillsauth add kvokov/oh-my-ai agent-initInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate or refine an AGENTS.md that contains only what agents cannot discover on their own — non-obvious commands, hidden constraints, workflow gotchas, and landmines.
AGENTS.md. But distinguish existence from intent: a file or directory existing is discoverable, but its status (deprecated, do-not-touch, under migration) and constraints (must not enable, requires special flags) are often NOT discoverable. Include those.AskUserQuestion for every developer-facing choice; always include an uncertainty / "I'm not sure" option.AGENTS.md, improve incrementally — never blind-replace. Show a diff summary before writing. "Incremental" means show a diff, NOT preserve everything. Stale content, redundant content, tech stack sections, directory overviews, and tooling-enforced rules MUST be actively pruned from existing files. The quality gate applies equally to existing and new content.AGENTS.md files near relevant modules instead of one monolithic root file.Every AGENTS.md you produce MUST follow this exact structure. Use these exact headings. Omit a section only if it has zero content — never rename or paraphrase the headings.
# Agent instructions — <project name>
<One-line scope statement: one sentence explaining what this file covers and why it exists. Required.>
## Non-discoverable commands
<Commands with non-obvious flags, multi-step procedures, or names that differ from convention.>
## Landmines
<Deprecated directories still imported, hidden dependencies, files that must not be touched, order-sensitive operations.>
## Conventions not enforced by tooling
<Commit message formats without commitlint, naming patterns without lint rules, review requirements not in CI.>
## Task-specific constraints
<Per-area guidance: "when working in X, always Y because Z.">
## Scope & routing
<For monorepos: which modules have their own rules, where to find them.>
The one-line scope statement immediately after the # Agent instructions heading is required. It must be 1-2 sentences explaining what this file covers that agents cannot discover from reading the repo. Example: "Non-discoverable constraints for agents working in this repo."
Scan the repository automatically. Do not ask the user anything yet.
Read and catalogue findings from these sources (skip any that do not exist):
| Priority | Files |
|----------|-------|
| Agent configs | AGENTS.md, CLAUDE.md, .cursor/rules/, .cursorrules, .github/copilot-instructions.md, GEMINI.md |
| Project docs | README.md, PROJECT.md, CONTRIBUTING.md, CHANGELOG.md |
| Tooling | package.json, pyproject.toml, Cargo.toml, go.mod, Makefile, Justfile, Taskfile.yml |
| CI / workflows | .github/workflows/*.yml, .gitlab-ci.yml, Jenkinsfile, .circleci/config.yml |
| Linter / formatter | .eslintrc*, .prettierrc*, biome.json, .rustfmt.toml, ruff.toml, .editorconfig |
| Config | tsconfig*.json, next.config.*, vite.config.*, .env.example, docker-compose*.yml |
For each source, extract:
Produce an in-memory repo profile — do not output it to the user. It feeds Phase 2.
See audit-checklist for the detailed scan procedure.
Compare the repo profile against any existing AGENTS.md:
Classify each gap as:
| Category | Example |
|----------|---------|
| command | npm test -- --no-cache required but package.json script is just vitest |
| landmine | /legacy directory still imported in production via barrel file |
| convention | Commit messages must follow Conventional Commits but no commitlint configured |
| routing | Module packages/auth has its own deploy pipeline not documented anywhere |
| env | DATABASE_URL required but .env.example is missing or incomplete |
If there are genuine ambiguities (conflicting signals, unclear intent), queue 2–3 targeted questions for Phase 3. If no ambiguities exist, skip Phase 3 entirely.
Ask 2–3 questions maximum via AskUserQuestion. Only ask about genuine ambiguities surfaced by the audit — never ask generic questions.
Good questions are specific and informed:
npm test -- --no-cache but the package.json script doesn't include that flag — is --no-cache always required?"/legacy directory is imported in src/index.ts but looks unmaintained — should agents avoid touching it?".env.example — are they required for local dev?"Bad questions (never ask these):
If no ambiguities exist, skip this phase and tell the user: "Audit was clean — no ambiguities found. Moving to draft."
Generate the AGENTS.md content using only material that passes the discoverability filter. See discoverability-filter for the filter specification. Use the exact structure defined in the Output format section above.
Quality gate: For every line in the draft, verify:
Delete any line that fails any check. Log every removal in audit-notes.md or changes-summary.md with the reason.
Present the final draft to the user via AskUserQuestion with options:
If updating an existing AGENTS.md, present a summary of changes: lines added, lines removed, lines modified.
Write the file only after explicit approval.
After writing AGENTS.md, remind the user:
AGENTS.mdis temporary guidance, not permanent configuration. When a recurring issue appears, prefer fixing the root cause in code or tooling (lint rule, test, script, config). Keep only the minimum instruction needed until the root cause is solved. Prune stale instructions aggressively.
Important: The tech stack details below (NestJS, npm, Jest, etc.) appear ONLY to explain the audit reasoning. They must NEVER appear in actual
AGENTS.mdoutput. The only output is the finalAGENTS.mdcontent shown in Phase 4.
Input: A NestJS API with npm workspaces, an existing but stale AGENTS.md.
Phase 1 finds CI uses --no-cache flag not in package.json scripts, an unmaintained src/legacy-auth/ module still imported, and REDIS_URL missing from .env.example.
Phase 2 classifies: command (hidden flag), landmine (legacy module), env (missing var), stale (existing "use yarn" instruction), redundant (existing directory overview).
Phase 3 asks one question about the legacy module; user confirms it's under migration and should not be touched.
Phase 4 produces (note: uses the exact prescribed headings, includes scope statement, and the ## Landmines section documents the deprecated directory's status — which is not discoverable even though the directory itself is visible):
# Agent instructions — acme-api
Non-discoverable constraints for agents working in this repo.
## Non-discoverable commands
- Always run tests with `npm test -- --no-cache`. The `--no-cache` flag is required because Jest module caching breaks fixture isolation. Running without it produces false greens.
- Run database migrations with `npx typeorm migration:run -d src/data-source.ts`. There is no npm script — invoke directly via npx.
## Landmines
- `src/legacy-auth/` is imported in `app.module.ts` but is under active migration. Do not modify files in this module. If a task requires auth changes, work in `src/auth-v2/` instead.
## Conventions not enforced by tooling
- `REDIS_URL` is required for local development but is not in `.env.example`. Set it to `redis://localhost:6379` for local work.
What is NOT included (and must never be): tech stack, directory structure, package manager choice, testing framework, framework version — all discoverable from repo files.
Avoid these failure modes — most violate the non-negotiables above:
AGENTS.md without showing what changed.tools
NestJS (Nest.js) production patterns for modules, controllers, providers, guards, interceptors, pipes, middleware, JWT, ValidationPipe, microservices, GraphQL, Bull queues, Prisma, and TypeORM. Triggers: NestJS, Nest.js, Nest module, dependency injection, class-validator DTO, exception filter, testing module, GraphQL resolver, Bull queue, microservice client. Uses: Read, Grep, Glob, Bash, WebSearch. Outputs: tier-ordered review checklists and/or concrete code edits with cited rule filenames. Do NOT use for: non-Nest backends (Express/Fastify only with no Nest integration), frontend-only frameworks, generating AGENTS.md, or toolchain setup unrelated to Nest.
development
Professional UI/UX design skill for React, Next.js, Tailwind CSS, React Native, and Flutter. Use when the user asks to create or polish UI components (modals, forms, tables, charts, navbars, sidebars, cards), design landing pages, build dashboards or admin panels, set up SaaS or mobile app screens, review or fix layout and accessibility issues, configure dark mode or responsive breakpoints, or establish a design system with tokens and component specs. Capabilities include: creating design-system token files and MASTER.md artifacts, generating responsive Tailwind layouts, scaffolding page-level component hierarchies, reviewing and fixing UI accessibility (a11y, WCAG), implementing React Native safe-area screens, and configuring Flutter ThemeData. Outputs design-system files (MASTER, page overrides, tokens, component specs) plus stack-faithful code. Do NOT use for: pure backend-only work with no UI impact, or inventing branding assets you do not have rights to use.
tools
Use this skill any time someone wants to create, scaffold, build, fix, improve, benchmark, or optimize a Tessl/Claude skill — even if they don't say 'tessl' explicitly. If the request involves making a new skill ('create a skill for X', 'build me a skill that does Y', 'scaffold a skill called Z'), fixing or completing an existing one (missing tile.json, broken repo integration, low eval scores, description not triggering), or running and iterating on evals, invoke this skill. The full workflow covers: structured interview → SKILL.md + tile.json + rules/ scaffolding → README/CI repo integration → tessl tile lint → optional Tessl CLI pipeline (skill review, scenario generate/download, eval run) → hand-authored evals or LLM-as-judge fallback → benchmark logging. Do NOT use for: editing application code, debugging, refactoring, writing general documentation, or creating presentations.
tools
Rigorous thirteen-part synthesis of a text or talk: deep summary, insights, structure, critique, framework rebuild, and CEO-level takeaways. Triggers: reading synthesis, synthesize this, deep dive, rigorous analysis, deconstruct, book analysis, article analysis, essay breakdown, intellectual synthesis, multi-dimensional analysis, executive summary of ideas, framework extraction. Uses: Read (and related file tools) for attached sources; WebSearch or WebFetch when comparands are missing or context is thin. Outputs: single structured markdown message with fixed section headers per rules/output-sections.md.