# Intent layer

> Intent layer is an open-source agent skill for developer tools. Builds hierarchical AGENTS.md context files so agents can navigate a codebase. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/crafter-station/skills/tree/main/skills/intent-layer
- **Repository:** https://github.com/crafter-station/skills
- **GitHub stars:** 115
- **License:** MIT
- **Skill name:** intent-layer
- **Collection:** https://github.com/crafter-station/skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill sets up an Intent Layer in a repository: a root context file plus optional child AGENTS.md files placed in larger or more complex subdirectories. It guides the agent through detecting whether a project already has this structure, measuring directory size in tokens, and then deciding where context files belong.

The workflow runs bundled bash scripts that report the current state (none, partial or complete), analyze the folder layout to find semantic boundaries, and estimate token counts per directory. Templates and example nodes in the reference files shape the generated documents, and a capture protocol supplies interview questions for pulling out ownership, invariants and common confusion from the people who know the code.

The skill expects a local project directory and a shell environment to run the scripts. Once a complete layout exists, it switches to a maintenance mode that audits existing nodes or looks for new areas that have grown large enough to need their own file.

## When your agent uses it

> Set up hierarchical Intent Layer (AGENTS.md files) for codebases. Use when initializing a new project, adding context infrastructure to an existing repo, user asks to set up AGENTS.md, add intent layer, make agents understand the codebase, or scaffolding AI-friendly project documentation.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs shell scripts](https://github.com/crafter-station/skills/tree/HEAD/skills/intent-layer)
- [No network calls found in its scripts](https://github.com/crafter-station/skills/tree/HEAD/skills/intent-layer)
- [License: MIT](https://github.com/crafter-station/skills/tree/HEAD/skills/intent-layer)

## Features

- **State detection script:** A shell script reports whether a project has no, partial or complete context files.
- **Directory token measurement:** Estimates token counts per source directory to decide where child nodes are useful.
- **Root file selection:** Asks whether the root should be CLAUDE.md or AGENTS.md and enforces a single root file.
- **Child node guidance:** Explains when to add subdirectory context files and where shared concerns should live.
- **Templates and examples:** Provides root and child node templates along with real-world reference patterns.
- **Knowledge capture interview:** Lists questions for documenting ownership, invariants and onboarding pitfalls.
- **Maintenance mode:** Audits existing nodes and re-measures the codebase to suggest new ones.

## Good for

- Set up AGENTS.md for a new project
- Add an intent layer to an existing repository
- Document ownership and invariants of a subsystem
- Audit existing AGENTS.md files for outdated context
- Find large directories that need their own context file

## Install

### Claude Code

This skill ships in the `stable` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add crafter-station/skills
/plugin install stable@crafter-station-skills
```

Or copy only this skill to `~/.claude/skills/intent-layer`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/crafter-station/skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/intent-layer &&
cp -R "$tmp/skills/intent-layer" ~/.claude/skills/intent-layer &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/intent-layer` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/intent-layer` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/crafter-station/skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/intent-layer &&
cp -R "$tmp/skills/intent-layer" ~/.agents/skills/intent-layer &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/intent-layer` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/intent-layer` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/crafter-station/skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/intent-layer &&
cp -R "$tmp/skills/intent-layer" ~/.cursor/skills/intent-layer &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/intent-layer` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/crafter-station/skills.git --path skills/intent-layer
```

Or copy the folder to `~/.gemini/skills/intent-layer` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/intent-layer`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/crafter-station/skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/intent-layer &&
cp -R "$tmp/skills/intent-layer" ~/.copilot/skills/intent-layer &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/intent-layer` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/crafter-station/skills.git
```

Then copy `skills/skills/intent-layer` into your agent's skills folder as `intent-layer`. Agents that support SKILL.md read one folder per skill.

## FAQ

### How does the skill get triggered?

It loads when a task matches its description, such as a request to set up AGENTS.md, add an intent layer or make agents understand the codebase.

### What does Intent layer change in a project?

It creates a root context file (AGENTS.md or CLAUDE.md, never both) and optional child AGENTS.md files in complex subdirectories, based on the templates and measurements it runs.

### Which scripts does Intent layer run?

Three bash scripts: detect_state.sh to check the current state, analyze_structure.sh to find semantic boundaries, and estimate_tokens.sh to measure directory size.

### How does Intent layer decide where child nodes go?

Its guidance points to directories over about 20k tokens, responsibility shifts, and cross-cutting concerns placed at their lowest common ancestor. It warns against creating nodes for every directory.

### How do I install Intent layer in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/intent-layer to use it in all your projects, or to .claude/skills/intent-layer in one project. Or install the stable plugin, which includes it: /plugin marketplace add crafter-station/skills, then /plugin install stable@crafter-station-skills.

### Does Intent layer run scripts?

Yes. It runs shell scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Intent layer?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Intent layer?

The closest alternatives to Intent layer are Wiki agents md, Agents md, Create agentsmd, Agents md improver and Context strategy.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Wiki agents md](https://ai-powered.com/skills/wiki-agents-md): Wiki agents md is an open-source agent skill for knowledge and memory.
- [Agents md](https://ai-powered.com/skills/agents-md-scaledockhq): Agents md is an open-source agent skill for developer tools.
- [Create agentsmd](https://ai-powered.com/skills/create-agentsmd): Create agentsmd is an open-source agent skill for developer tools.
- [Agents md improver](https://ai-powered.com/skills/agents-md-improver): Agents md improver is an open-source agent skill for developer tools.
- [Context strategy](https://ai-powered.com/skills/context-strategy): Context strategy is an open-source agent skill for developer tools.
- [Agents md](https://ai-powered.com/skills/agents-md): Agents md is an open-source agent skill for files and documents.
- [Setup repo skills](https://ai-powered.com/skills/setup-repo-skills): Setup repo skills is an open-source agent skill for developer tools.
- [Agentic os](https://ai-powered.com/skills/agentic-os-smartworldarafath): Agentic os is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/intent-layer
