Testing & QAlow risk

agents-md

Create and maintain AGENTS.md documentation for simple projects, complex monorepos, deterministic discovery, scoped instruction files, low-token navigation; use when generating AGENTS.md, updating agent docs, standardizing AI-facing project guidance.

pantheon-org/tekhne·skills/agentic-harness/agents-md/SKILL.md
85/ 100质量分

导入这个 Skill

选择你的 coding agent,复制项目级或个人级安装命令。

固定到平台收录的 commit
导入当前项目.agents/skills/agents-md
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/agentic-harness/agents-md -a codex -y
导入个人环境~/.agents/skills/agents-md
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/agentic-harness/agents-md -a codex -g -y
手动放置目录.agents/skills/agents-mdOfficial docs ↗
导入当前项目.claude/skills/agents-md
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/agentic-harness/agents-md -a claude-code -y
导入个人环境~/.claude/skills/agents-md
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/agentic-harness/agents-md -a claude-code -g -y
手动放置目录.claude/skills/agents-mdOfficial docs ↗
导入当前项目.agents/skills/agents-md
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/agentic-harness/agents-md -a github-copilot -y
导入个人环境~/.copilot/skills/agents-md
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/agentic-harness/agents-md -a github-copilot -g -y
手动放置目录.agents/skills/agents-mdOfficial docs ↗
导入当前项目.agents/skills/agents-md
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/agentic-harness/agents-md -a cursor -y
导入个人环境~/.cursor/skills/agents-md
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/agentic-harness/agents-md -a cursor -g -y
手动放置目录.agents/skills/agents-mdOfficial docs ↗
导入当前项目.agents/skills/agents-md
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/agentic-harness/agents-md -a gemini-cli -y
导入个人环境~/.gemini/skills/agents-md
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/agentic-harness/agents-md -a gemini-cli -g -y
Native Gemini CLIgemini skills install https://github.com/pantheon-org/tekhne.git --scope workspace --path skills/agentic-harness/agents-md
手动放置目录.agents/skills/agents-mdOfficial docs ↗
⚠ 安装命令使用开源 skills CLI。执行前请检查来源、脚本和权限。
# AGENTS.md Management

## When to Use

- "Create AGENTS.md for this repo."
- "Update agent documentation for this monorepo."
- "Set up hierarchical AGENTS.md files by package."

## When Not to Use

- Pure code implementation work with no documentation update.
- One-off prompts where repository guidance files are unnecessary.

## Principles

- Keep instructions concise, concrete, and path-specific.
- Prefer references and indices over duplicated prose.
- Optimize for nearest-file relevance in hierarchical layouts.

## Workflow

1. Discover repository shape and technologies.
Output: simple vs hierarchical documentation strategy.
2. Select structure (single root file or root + sub-files).
Output: file layout plan.
3. Generate AGENTS.md content with concrete commands and paths.
Output: actionable docs with JIT indexing.
4. Validate command correctness and duplication boundaries.
Output: clean, copy-paste-safe instruction files.
5. Re-check after major repo changes.
Output: synchronized documentation.

## Structure Decision

- Simple project: one AGENTS.md when stack and patterns are uniform.
- Complex monorepo: root AGENTS.md + scoped subdirectory AGENTS.md files.
- Consider adding subdirectory files iteratively — start minimal, expand as complexity grows.

## Minimal Template

```markdown
# Project Agent Guide

## Commands
- Build: `bun run build`
- Test: `bun run test`
- Lint: `bun run lint`

## Conventions
- [describe key patterns here]

## Key Paths
- Source: `src/`
- Tests: colocated `*.test.ts`
```

## Quick Commands

```bash
# Discovery baseline
rg --files
```

```bash
# Detect core config/tooling
rg -n "workspaces|nx|turbo|pnpm|yarn|packageManager|tsconfig|pytest|playwright" .
```

```bash
# Locate existing AGENTS files
find . -name AGENTS.md -o -name AI-DOCS.md
```

## Anti-Patterns

### NEVER assume a technology stack without discovery

WHY: incorrect assumptions produce unusable instructions.
BAD: generate React/Jest guidance without evidence. GOOD: run discovery commands and map docs to detected stack.

### NEVER dump encyclopedic content into root AGENTS.md

WHY: oversized docs increase token cost and reduce usability.
BAD: embed full framework manuals. GOOD: keep root concise and link to scoped files/references.

### NEVER duplicate the same instructions across root and sub-files

WHY: duplication creates drift and maintenance overhead.
BAD: copy/paste identical conventions in every file. GOOD: keep universal rules at root and package-specific rules locally.

### NEVER provide unverified commands

WHY: broken commands erode trust and block contributors.
BAD: include hypothetical commands. GOOD: include only validated copy-paste commands.

## Verification

```bash
bunx markdownlint-cli2 "**/AGENTS.md"
```

```bash
bun run lint
```

## References

| Topic | Reference |
| --- | --- |
| Repository discovery commands | [references/discovery-commands.md](references/discovery-commands.md) |
| What to avoid | [references/anti-patterns.md](references/anti-patterns.md) |
| API package template | [references/api-template.md](references/api-template.md) |
| Design-system template | [references/design-system-template.md](references/design-system-template.md) |
| Database package template | [references/database-template.md](references/database-template.md) |
| Testing package template | [references/testing-template.md](references/testing-template.md) |
| Troubleshooting | [references/troubleshooting.md](references/troubleshooting.md) |