Skip to content
Back to skills

Contextual Setup

ASecurity

Use when the person says "set up contextual", "set up the context", "fill in the context" or "plan this project", or right after `usecontextual init`. Writes the project's context in context/ for the first time: from contextual-plan.md when there is one, from a few questions when the repo is empty, or from the existing code.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 17, 2026
ai-agentsgoshellnodegit

Works with

  • cli

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned November 17, 2026

npx -y skills add mikaelendale/contextual --skill contextual-setup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Contextual Setup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Contextual Setup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mikaelendale-contextual-setup/badge)](https://www.skillsdirectory.com/skills/mikaelendale-contextual-setup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: contextual-setup
description: Use when the person says "set up contextual", "set up the context", "fill in the context" or "plan this project", or right after `usecontextual init`. Writes the project's context in context/ for the first time: from contextual-plan.md when there is one, from a few questions when the repo is empty, or from the existing code.
license: MIT
---

# Set up the project context

`usecontextual init` laid down `AGENTS.md`, `CLAUDE.md` and the `context/` skeleton. Every place that needs content holds a `<!-- fill: … -->` comment. This skill replaces each comment with the project's real content and deletes the comment.

First read `context/.meta.json`. Its `cli` value is the command that runs the CLI in this repo, written `<cli>` below.

## 1. Find the path

Look at what's in the repo, ignoring `.git/`, `context/`, `AGENTS.md`, `CLAUDE.md`, the skill folders and what `init` added (a `package.json` whose only dependency is `usecontextual`, its lockfile, `node_modules/`, `.gitignore`).

- `context/idea.md` exists: setup already ran. Stop, and ask what the person wants changed.
- A plan file: `contextual-plan.md` at the repo root, a file there like `contextual-plan (1).md` (a browser's download name), or one the person points to anywhere. Copy any of the others to `contextual-plan.md` at the root, byte for byte (`cp`), and delete the root copy with the odd name. Then **path 1**: go to step 3. If the repo also has code, path 1 still applies, and [references/fill-from-plan.md](references/fill-from-plan.md) says how to account for that code.
- No plan file and nothing else in the repo: **path 2**. Go to step 2.
- No plan file, but there is code: **path 3**. Follow [references/existing-code.md](references/existing-code.md): scan, propose the features and their paths, wait for the person to confirm, then write. Change no code.

## 2. Path 2: ask, then write the plan

1. Ask the questions in [references/questions.md](references/questions.md), all in one message. Then wait for the answers.
2. Write `contextual-plan.md` at the repo root from the answers. Start from [assets/contextual-plan.md](assets/contextual-plan.md) and follow the format in [references/plan-file.md](references/plan-file.md). Keep the person's own words in Idea and Users.
3. Show the plan and ask the person to confirm it or say what to change. Don't write anything in `context/` until they confirm.

## 3. Write the context from the plan

Read `contextual-plan.md` in full. Then fill the files in the order given in [references/fill-from-plan.md](references/fill-from-plan.md), which says what goes where. Always add a first feature the plan doesn't list, `foundation`: it owns the app shell, layouts and config. Rules for every file:

- Keep every heading the template has, in order. Delete each `<!-- fill: … -->` comment once its content is written.
- Write only what the plan says or what follows directly from it. When something isn't decided, write "Not decided yet" and add it to `context/questions.md`: under "For the owner" if it's about the product (what it does, for whom, money, accounts, content), or, if it's a technical choice you can make yourself, make it, record it in `context/decisions/`, and list it under "Proposed by the agent". `status/main.md` lists only the questions that block the next feature.
- Never edit between `<!-- contextual:start -->` and `<!-- contextual:end -->` in `AGENTS.md`, and never edit `context/design/deslop.md` or `context/features/_index.md`.
- Paths 1 and 2 write no `log.md` or other feature files: setup isn't work on a feature, and a planned feature has only its `README.md`. (Path 3 gives each feature it finds all five files.) The definition of done in `AGENTS.md` starts with the first feature.

## 4. Finish

1. Move `contextual-plan.md` to `context/idea.md` without changing a character: plain `mv`, or `git mv` if `git ls-files contextual-plan.md` lists it. Then check that `context/idea.md` exists and the plan file is gone. From now on nobody edits `idea.md`.
2. Run `<cli> check --fix`. It rebuilds the feature index and stores the hash of `idea.md`. Then fix every error it reports and run it again, until there are 0 errors. Before any code exists, these warnings are expected: no code outside `context/`, and `shared:` paths that match no files yet.
3. If this is a git repo, commit everything setup wrote, plus what `init` added, as one commit on the default branch: `Set up Contextual`. Skip this if the person said not to commit.
4. Tell the person, in a few lines, what you wrote, the questions waiting for them in `context/questions.md` (and which choices you proposed), and that "build the next feature" starts Phase 1.

Files in this skill

  • SKILL.md4.6 KB
  • assets/contextual-plan.md1007 B
  • assets/decision.md421 B
  • assets/feature-README.md759 B
  • assets/stack-lib.md449 B
  • references/existing-code.md3.8 KB
  • references/fill-from-plan.md8.9 KB
  • references/plan-file.md4.5 KB
  • references/questions.md1.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.