> ## Documentation Index
> Fetch the complete documentation index at: https://docs.actionllama.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Shared Context

> Share conventions, repo layout, and policies across all your agents

Agents often need the same context — coding conventions, repo layout, team policies. The `shared/` directory lets you maintain this context in one place and reference it from any agent's `SKILL.md`.

## How it works

Place files in a `shared/` directory at your project root. At image build time, these files are baked into every agent's container at `/app/static/shared/`.

```
my-project/
├── config.toml
├── shared/
│   ├── conventions.md
│   ├── repo-layout.md
│   └── team/
│       └── review-policy.md
├── agents/
│   ├── dev/SKILL.md
│   └── reviewer/SKILL.md
```

## Referencing shared files in SKILL.md

Use direct context injection to include shared files in your agent's prompt:

```markdown theme={null}
## Context

!`cat /app/static/shared/conventions.md`
!`cat /app/static/shared/repo-layout.md`
```

Each agent chooses which shared files to include. There is no automatic injection — you control exactly what context each agent receives.

## Example: coding conventions

Create `shared/conventions.md`:

```markdown theme={null}
# Coding Conventions

- TypeScript strict mode, no `any`
- Use `vitest` for tests, mirror `src/` structure in `test/`
- Prefer named exports over default exports
- Error messages should include enough context to debug without a stack trace
```

Reference it in `agents/dev/SKILL.md`:

```markdown theme={null}
# Dev Agent

You solve GitHub issues by writing code.

## Context

!`cat /app/static/shared/conventions.md`

## Workflow

1. Read the issue
2. Write the fix following the conventions above
3. Run tests
4. Open a PR
```

And in `agents/reviewer/SKILL.md`:

```markdown theme={null}
# Reviewer Agent

You review pull requests for correctness and style.

## Context

!`cat /app/static/shared/conventions.md`

## Workflow

1. Read the PR diff
2. Check against conventions
3. Approve or request changes
```

Both agents now share the same conventions without duplication.

## Subdirectories

The `shared/` directory supports subdirectories. A file at `shared/team/review-policy.md` is available at `/app/static/shared/team/review-policy.md` inside the container.

## Cloud deployment

The `shared/` directory is included in project deployments.
