Configures Claude Code hooks and Codex hooks.json/notify. Use when adding PreToolUse guards, Stop hooks, managed hooks, format-on-save, preflight, audits, or worktree/budget hooks.
日本語の概要は準備中です。原文の説明を表示しています。
Owns instruction files: AGENTS.md, CLAUDE.md, personal and repo rules. Use when writing, pruning, auditing them, sharing rules across Claude and Codex, or fixing ignored rules.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Configure project memory so Claude Code and Codex get stable, scoped instructions across sessions without bloating every prompt. For shared teams, keep the portable project rules in AGENTS.md, mirror that into CLAUDE.md when needed, and keep tool-specific behavior in the tool's native layer.
Scope. This skill owns the instruction files themselves (AGENTS.md, CLAUDE.md, .claude/rules/, AGENTS.override.md, auto-memory): what goes in them, how each runtime loads them, and the instruction budget. Long-term memory systems for users, agents, or knowledge (extraction, consolidation, temporal facts, vector/graph stores, memory vendors) belong to ai-context-layer. Context architecture beyond those files (hot/warm/cold layers, compiled knowledge bases, context graphs, maturity models) belongs to dev-context-engineering, which links here for the baseline.
Treat repo memory as a living exception file. If an agent can reliably infer something by reading the code, config, or README, keep it out of the always-loaded layer. Put only the durable, non-inferable guidance here.
| Layer | Typical Location | Purpose |
|---|---|---|
| Shared project memory | ./AGENTS.md | Portable repo instructions for Codex and other AGENTS.md-aware tools |
| Claude project memory | ./CLAUDE.md | Claude Code project instructions. Whether Claude Code also reads AGENTS.md natively depends on version, provider, and whether a CLAUDE.md-family file exists — look it up before dropping the @AGENTS.md import or symlink (loading-and-layers.md) |
| Claude scoped rules | ./.claude/rules/*.md | Modular Claude-only rules, optionally path-scoped |
| Personal instructions (Codex + Claude Code) | ~/.codex/AGENTS.md; ~/.claude/CLAUDE.md imports it with @~/.codex/AGENTS.md | One personal file for both runtimes; repo files hold project facts only (loading-and-layers.md) |
| Codex directory override | ./AGENTS.override.md | Higher-precedence guidance for one directory; it may be local or checked in |
| Codex runtime permissions | ~/.codex/config.toml, trusted .codex/config.toml, permission profiles, .rules | Configure sandbox boundaries, approval policy/reviewer, and executable command policy |
| Codex auto-memory | ~/.codex/memories/ (feature flag in config.toml) | Machine-local accumulated recall; may be off for teammates; keep must-always rules in AGENTS.md, not here |
| Claude auto memory | ~/.claude/projects/<project>/memory/ — MEMORY.md index + topic files | Machine-local, accumulated notes; a capped prefix of MEMORY.md loads each session (look up the cap); topic files load on demand |
| Instruction budget | One shared pool across all loaded tiers; ≤200 lines per always-loaded file | HumanLayer's informal estimate (~150–200 instructions) is directional, not measured; the runtime's own prompt uses part of it. Owner: claude-md-instruction-budget.md |
| Layered memory model | references/memory-patterns.md | Keep the hot memory small; push history and reusable procedures into the right layers |
| Need | Best Place |
|---|---|
| Stable repo rules shared by every tool | AGENTS.md |
| Claude Code-specific modular rules | .claude/rules/*.md |
| Personal behavioral instructions across repos, both runtimes | ~/.codex/AGENTS.md, imported by ~/.claude/CLAUDE.md; never copied into repos |
| How the agent writes replies to you (answer first, one decision per question) | the personal file; template in reply-clarity-ste.md |
| Codex runtime defaults and approval behavior | ~/.codex/config.toml or trusted .codex/config.toml |
| Local-only Claude settings | .claude/settings.local.json |
| Machine-local scratch guidance that evolves over time | Claude auto memory |
| Task-specific playbooks or workflows | skills, not project memory |
| Searchable corpus memory across many docs/repos | vector brain or docs retrieval layer, not hot project memory |
Full per-runtime loading semantics and the config.toml vs AGENTS.md split: references/loading-and-layers.md.
Use the AGENTS.md inclusion checklist before adding or retaining a line in project memory.
AGENTS.md or CLAUDE.md: project purpose, hard constraints, key commands, and "must not break" rules..claude/rules/ when it would otherwise bloat the shared file.AGENTS.md files in packages or services that truly need local context.AGENTS.md point to a compact router/discovery map first, then to the full catalog (for example a generated <catalog>/discovery.md, then <catalog>/graph.json only after the router is chosen).AGENTS.md, name the primary routers explicitly when they are the intended entry points. Keep one-line scopes in hot memory; keep skill lists, scenario detail, and per-router Mermaid in generated graph artifacts.AGENTS.md update. Add rules reactively (after repeated mistakes), not preemptively. Format: rule + why + example of the mistake.AGENTS.md: merge the branch into dev, run the repo gate, remove the worktree, verify git worktree list --porcelain, and delete stale session metadata. Do not let worktrees become long-lived storage for abandoned branches or dirty experiments.AGENTS.md → skills → automations. If a workflow in AGENTS.md becomes repeatable, extract it into a skill. If a skill runs on a cadence, wrap it in an automation. Skills define the method; automations define the schedule.AGENTS.md (see references/claude-md-fragments.md §3). Model, tool-schema, or MCP changes can reduce prompt-cache reuse, but invalidation and billing are provider- and runtime-specific. Confirm with usage telemetry before calling a change the dominant token cost.Project memory is an operational router, not a documentation dumping ground.
AGENTS.md. Put runtime approval/reviewer policy in Codex configuration.docs/operations/ or docs/runbooks/ when they need owners, steps, and evidence.docs/context/ or context/ with a rebuild command; do not paste generated catalogs into hot memory.AGENTS.md a catalog, report index, or plan archive, move that detail to docs and leave only the pointer and rule.For larger knowledge bases, keep a three-zone file structure instead of dumping everything into hot memory:
raw/: imported source material and unprocessed notescompiled/ or wiki/: reviewed, source-linked canonical pagesoutputs/: generated answers and reports waiting for reviewOnly promote generated outputs into compiled/ after source review. If the corpus needs semantic search or cross-repo retrieval, route to ai-vector-brain.
For repos with many skills or agent workflows, use AGENTS.md as the router pointer, not the skill catalog. Keep the root file to a short generated index and a small set of entry points:
## Start Here (load on demand)
- `<catalog>/discovery.md` — compact router map when the full skills list exceeds the runtime's discovery budget
- `<catalog>/graph.json` — full generated skill catalog after choosing a router
## Primary Routers
- `$router-main` — choose the correct domain router
- `$router-<domain-a>` — one-line scope
- `$router-<domain-b>` — one-line scope
Do not paste the full skill list into AGENTS.md. The generated discovery file is the hot-context map; router SKILL.md files, graph.json, and per-router Mermaid files are the detail layer.
Keep the hot memory small and intentional. The four load-bearing rules:
Full detail (intent-first model, promoting auto-memory notes into instruction files, working-if metric, verification templates): references/memory-discipline.md.
For the three durable patterns — Hooks vs Project Memory (when to enforce instead of suggest), Three-Tier Boundaries (Always / Ask / Never), and Progressive Disclosure (pointers over inlined docs) — see references/structure-patterns.md.
For path-scoped rules, cross-platform symlink/import strategy, large-repo guidance, and the memory progression ladder (flat files → vector → graph-vector hybrid), see references/platform-and-scale.md.
.worktrees/ is part of the repo flow: merge to the integration branch, run gates, remove worktrees, verify no stale worktrees remainKeep it practical. A short, accurate AGENTS.md is more useful than a long file full of vague rules. Start with the basics, then add new rules only after you notice repeated mistakes.
# Check the version (look up the auto-memory minimum in the Claude Code memory docs)
claude --version
# Which instruction files actually loaded this session (Memory files section)
/context
# Browse or edit CLAUDE.md, rules, and auto-memory files; toggle auto memory
/memory
# Disable auto-memory: a settings key (project) or an environment variable (global);
# look up the current names in the Claude Code memory docs before scripting them.
# Inspect the auto-memory directory directly. The project segment is the repo root's
# absolute path with "/" replaced by "-", not its basename. Confirm with /memory.
ls ~/.claude/projects/"$(git rev-parse --show-toplevel | tr '/' '-')"/memory/
bash skills/universal/agents-memory/scripts/lint_claude_memory.sh . — 0 errors (a repo with no memory files exits non-zero; that is a finding, not a pass)bash skills/universal/agents-memory/scripts/audit_repo.sh . — no HIGH findingswc -l CLAUDE.md AGENTS.md .claude/rules/*.md); the lint warns past 200{{placeholders}} in CLAUDE.md (rg "{{[^}]+}}" CLAUDE.md)CLAUDE.md and AGENTS.md not both hand-maintained (use symlink or @AGENTS.md import); no stray CLAUDE.local.md silently suppressing native AGENTS.md readingMEMORY.md well inside the runtime's load cap if you edit it manually.claude/rules/ carry paths: frontmatter for file-type filteringunzip -l app.ipa | grep -iE 'claude|agents')Layered validators ship with this skill — pick by scope:
| Scope | Script | Checks |
|---|---|---|
| Single repo (size/symlink/secrets/imports) | scripts/lint_claude_memory.sh <repo> | Original linter — keep as the cheap pre-commit gate |
| Validator regression | scripts/test_memory_scripts.sh | Fail-closed contract for the four scripts: missing, empty, or blank input exits non-zero |
| Single repo (paths + hallucination-bait + lint integration) | scripts/audit_repo.sh <repo> | Stale-path resolution with prefix support, script executability, wrong-layer detection, scaffold-tense, "Agent Execution Style" platitudes; supports --json |
| Multi-repo portfolio | scripts/audit_portfolio.sh <repo1> <repo2> ... or --from-file <list> | Per-repo report + aggregate HIGH/MED/LOW summary; exits nonzero on any HIGH |
| Cross-repo alignment review | scripts/compare_blocks.sh <repo1> <repo2> ... | Finds H2 sections shared across repos; classifies IDENTICAL / ALIGNMENT-CANDIDATE / REVIEW / DIVERGENT by line overlap |
Author-facing directives (in AGENTS.md head):
<!-- audit-path-prefix: app/src/, app/lib/ --> — declare prefix conventions for path resolution.<!-- audit-ignore: ./gradlew, res/values/strings.xml --> — whitelist intentional non-existent paths (DON'T-do-this examples, future tooling). Glob patterns supported.<!-- pre-code --> or a "Pre-Code Caveat" section — auto-suppresses the scaffold-tense MED warning.Manual checks still required:
Full operator playbook: references/portfolio-audit-runbook.md.
Summary of the highest-impact failure modes:
AGENTS.md and CLAUDE.md without a symlink (drift)AGENTS.md into a docs folder, repo catalog, or report archiveAGENTS.md/CLAUDE.md from vendored deps, submodules, or unreviewed PRs as trusted instructions instead of untrusted inputFull list including the model-era anti-patterns (progress scaffolding, long "Don't" lists, implicit fan-out): references/traps-and-antipatterns.md.
| Resource | Purpose |
|---|---|
| references/zero-to-working-recipe.md | Copy-paste 5-step recipe: empty repo → working AGENTS.md / CLAUDE.md in under 10 minutes |
| references/typical-scenarios.md | End-to-end walkthroughs (situation → layer → write → verify): instructions ignored, team handoff, prompt→memory migration, bloat recovery, Codex-only setup, portfolio-drift remediation, headless/CI runs |
| references/loading-and-layers.md | Per-runtime loading semantics (layers concatenate); native AGENTS.md reading and cross-runtime instruction files as lookup steps; config.toml vs AGENTS.md split |
| references/claude-md-fragments.md | Paste-ready CLAUDE.md / AGENTS.md blocks (Task Delegation, Preferred Tools, Session Model) with cache-protection rationale |
| references/memory-examples.md | Full AGENTS.md / CLAUDE.md examples by stack |
| references/nested-feature-memory-examples.md | Bullet-style template for nested per-feature/per-package CLAUDE.md (synthetic worked example) — rule + identifier + inline gotcha pattern, plus build-bundle hygiene |
| Resource | Purpose |
|---|---|
| references/memory-discipline.md | Intent-first memory, exception test, instruction budget, working-if metric, feedback loops |
| references/claude-md-instruction-budget.md | Single owner of the instruction budget: hedged ceiling and its source, tier hierarchy, 5-section template, hard caps, delete-line test, auto-memory path |
| references/structure-patterns.md | Hooks vs memory, three-tier boundaries, progressive disclosure |
| references/memory-patterns.md | Patterns including progressive disclosure, three-tier boundaries, and feedback loops |
| references/traps-and-antipatterns.md | Durable trap list and model-era anti-patterns |
| references/coding-behavior.md | Canonical coding-behavior rules with rationale (a reference, too long to load every turn) |
| references/coding-behavior-active.md | Condensed active contract (≤150 lines) — the file a repo's .claude/rules/coding-behavior.md should point at |
| references/coding-behavior-completeness.md | Greenfield counterpart: coding-behavior rules for completeness mode (do not load with defensive mode) |
| references/reply-clarity-ste.md | ASD-STE100 adapted for agent replies: paste-ready personal-file section, where STE hurts, method to derive rules from your own transcripts |
| references/instruction-inclusion-checklist.md | Short keep/move/remove review for deciding what belongs in AGENTS.md, with scoped examples and path-freshness checks |
| Resource | Purpose |
|---|---|
| references/platform-and-scale.md | Path-scoped rules, cross-platform bridging, large-repo and memory-progression guidance |
| references/large-codebase-strategy.md | Monorepo and large-codebase (100K-1M LOC) configuration patterns |
| references/memory-architecture-ceilings.md | When flat AGENTS.md stops scaling — graph-vector hybrid stores, compiled-truth + timeline schema, tiered enrichment |
| references/claude-managed-agents-memory.md | Filesystem-backed memory stores for Claude Managed Agents: mount path, multi-agent sync, version history, read_only vs read_write, export API |
| Resource | Purpose |
|---|---|
| references/memory-migration-between-model-generations.md | Model-upgrade memory migration checklist (any model generation): regression-test first, retire compensations for old quirks, tighten literal wording, look up the vendor's migration guide |
| references/real-world-advanced.md | Annotated production AGENTS.md example (multi-agent, quality gates, battle-tested patterns) |
| Resource | Purpose |
|---|---|
| references/cross-doc-audit.md | Hallucination-bait taxonomy + parallel-subagent audit recipe; Pre-Code Caveat, source-of-truth/exporter, and "when-X-lands" patterns |
| references/portfolio-audit-runbook.md | Operator playbook for audit_repo.sh / audit_portfolio.sh / compare_blocks.sh — directives, cadence, worked example |
| references/harness-audit.md | Harness health-check playbook: inventory → verify current best practices → instrument fires → prune on data; marketplace-skill boundary, gate immutability, divergence tripwires |
| data/sources.json | Official and community links to platform docs and guides |
| Skill | Purpose |
|---|---|
| agents-hooks | Hook automation and compaction survival |
| agents-mcp | MCP config in project memory files |
agents-openclaw-ops | OpenClaw runtime setup, workspaces, skills, and sandboxing |
| agents-skills | Skill packaging and progressive disclosure |
| agents-subagents | Agent and subagent setup |
| ai-coding-agents-safety-envelope | Approval reviewers, sandbox boundaries, permission profiles, and executable rules |
| ai-coding-agents-state | Session lifecycle, transcript recovery, and cross-worktree resume |
| ai-coding-agents-settings-policy | Full Codex configuration precedence and managed-policy layering |
| docs-codebase | Repo documentation patterns |
When prior decisions or pitfalls are relevant, consult learnings.consolidated.md if present; use learnings.md only for needed history or as the available fallback. Otherwise skip both.
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Configures Claude Code hooks and Codex hooks.json/notify. Use when adding PreToolUse guards, Stop hooks, managed hooks, format-on-save, preflight, audits, or worktree/budget hooks.
日本語の概要は準備中です。原文の説明を表示しています。
Configures and hardens Claude Code and Codex MCP servers. Use when connecting databases, APIs, SaaS, building servers, or serving a clearance-filtered knowledge base.
日本語の概要は準備中です。原文の説明を表示しています。
Creates and audits agent skills: SKILL.md, references, scripts, runtime metadata. Use when writing, validating, or security-reviewing a skill, or fixing truncated skill listings.
日本語の概要は準備中です。原文の説明を表示しています。
Adds per-skill learnings loops for dated patterns, mistakes, and domain facts. Use when wiring skill memory, consolidation, or drift audits.
日本語の概要は準備中です。原文の説明を表示しています。
Chooses subagent, team, workflow, or debate and launches it on Claude Code or Codex. Use when delegating, running agent review boards, or installing shared agents.
日本語の概要は準備中です。原文の説明を表示しています。
Designs and runs agent hives and multi-agent waves. Use when setting hive roles, code gates, dependency-graph fan-out, or verifier, vote and loop-until-dry passes.
日本語の概要は準備中です。原文の説明を表示しています。