Context Skill
SkillFiles & storageAdd and evolve Counterfact context classes in _.context.ts files, including required unit test coverage for context behavior.
Then ask your AI: use the Context Skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add it as a step in a pipeline you build on Ahel, or connect Ahel to Claude, ChatGPT, Cursor, Claude Code or Codex and ask your AI to use it.
What this skill tells your AI
The instructions your AI receives, as published by counterfact/api-simulator in skills/context/SKILL.md and read by Ahel’s review.
Purpose
Define and maintain stateful business logic in _.context.ts files.
What _.context.ts is for
A _.context.ts file owns state and business rules for a route subtree.
Handlers call methods on $.context; they should not implement core logic
inline.
Context class API expectations
- Expose methods for domain actions (create/read/update/delete/query).
- Keep state private where possible.
- Return plain values that route handlers can map to HTTP responses.
- Use clear method names that describe behavior (not transport concerns).
Required rules
- Any new or modified context method must include unit tests.
- Test the Context class directly (no server boot required).
- Do not populate dummy data directly in context changes.
- Delegate dummy data creation/seeding to scenario modules under
scenarios/.
Step-by-step
- Update or add methods in
routes/**/_.context.ts. - Keep route files calling these methods via
$.context. - Add/adjust unit tests for the changed context methods.
- If sample data is needed, add/update a scenario function instead of hardcoding defaults in context constructors.
References
Signals
- GitHub stars
- 170
- Forks
- 20
- Last commit
- Oct 2026
Advanced
- Item type
- skill
- Key
context-counterfact- Source
- github.com/counterfact/api-simulator
github.com/counterfact/api-simulator
Related picks
Skill · thedaviddias
The pick for JavaScriptmodern-javascript-patterns
Skill · sickn33
The pick for JavaScriptsetup-ts-deep-modules
Skill · mattpocock
The pick for TypeScripttypescript-providers
Skill · composiohq
The pick for TypeScriptpptx
Skill · anthropics
More in Files & storagedocx
Skill · anthropics
More in Files & storage