jodavis/agent-plugins/use-context-file
Claude Code and agent skill by jodavis/agent-plugins
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install jodavis/agent-plugins/use-context-fileSKILL.md
The same SKILL.md was published earlier as jodavis/agent-plugins/use-context-file.
Resolving the context file path
The context file for a work item lives at: <DEV_TEAM_STATE_DIR or ~/.dev-team>/<repo-slug>/<work-item-id>.md
If the argument ends in .md or points to an existing file, it is already the <context-file> path. Derive the <work-item-id> from the filename stem (e.g. PROJ-228.md → PROJ-228).
Otherwise, if a <work-item-id> argument was given, treat it as the <work-item-id> and compute the context file path.
If no argument was given at all, use the identify-project-work-items skill to determine the <work-item-id> from the user's input or conversation context, then compute the context file path from it.
<skill-dir> below refers to this skill's own base directory — the "Base directory for this skill" path shown when this skill was invoked. Resolve it to that literal path; it is not an environment variable.
If the script exits non-zero, stop and report the error.
Ensure the file exists (creates it with default frontmatter if missing):
If the script exits non-zero, stop and report the error.
Reading the context file
Read <context-file> and extract these YAML frontmatter fields:
| Field | Meaning | |
|---|---|---|
work_item_id | The work item actively being worked on | |
spec_path | Repo-relative path to the spec file (may be empty) | |
working_branch | The working branch for this task-work-item (may be empty) | |
base_branch | Base branch this task-work-item's working branch was created from (may be empty) | |
parent_work_item | The parent feature-work-item ID, if one was found (may be empty) | |
pr_url | URL of the GitHub PR (may be empty) | |
added_to_stack | Whether this task's PR has been registered into the epic's gh stack via add-to-pr-stack (default false — only ever set once, after sign-off) | |
state | Current workflow state |
Fields marked "may be empty" are not guaranteed to be set — a caller that needs one and finds it empty must compute it itself (see e.g. ensure-working-branch) rather than assuming a default.
Confirming the working branch
If you are about to read or write repository files (not just the context file itself), confirm the working branch here:
- If
working_branchis empty: invoke theensure-working-branchskill with thework-item-id
to compute, create, and check it out. If it reports anything other than the literal word successful, stop and report the failure in detail — do not proceed to read or write any other repository file.
- If
working_branchis set: cheaply confirm the repo is actually on it —
git rev-parse --abbrev-ref HEAD and compare to working_branch. If they match, no further action is needed. If they don't match (or you need to confirm it's up to date with the remote), invoke ensure-working-branch — it re-checks the context file's already-known fields itself and only recomputes what's actually missing. If it reports anything other than the literal word successful, stop and report the failure in detail — do not proceed to read or write any other repository file.
Skip this whole check if you only need to read context-file fields and won't touch any other repository file this turn.
The context file also carries a <!-- section:Project Configuration --> body section, written by init-context-file.py when it first creates the file: the full merged project configuration (the same JSON get-project-configuration returns), computed once at the start of the pipeline workflow. If this section exists, do not use the get-project-configuration skill again, instead read it from the context file.
Writing to the context file
Each named section in the context file body uses this sentinel format:
If the sentinel already exists: use Edit to replace all content between the sentinel and the next <!-- section: marker or end of file.
If the sentinel does not exist: use Edit to append the sentinel and content after the last line of the file.
Always use Edit, never Write — concurrent agents may share this file.
Updating frontmatter fields
Use Edit to update the existing field: value line in the YAML frontmatter block.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/dev-team/skills/use-context-file/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jodavis/agent-plugins/use-context-file)