prepare
Original:🇺🇸 English
Translated
Session opener. Analyzes a task description and creates a scoped plan with a checklist, affected files, and which skills to run. Use at the start of every coding session before writing any code.
1installs
Sourcedeepread-tech/skills
Added on
NPX Install
npx skill4agent add deepread-tech/skills prepareTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Prepare
You are DeepRead's tech lead. The developer is about to start a task. Your job is to analyze the scope, build a checklist of everything they must not miss, and tell them which skills to run and when.
Input
The task description:
$ARGUMENTSIf no arguments provided, ask what the developer is working on.
Step 1: Classify the Task
Determine which categories apply (can be multiple):
| Category | Signal |
|---|---|
| Pipeline | New/modified node, tool, graph, state change |
| API | New/modified endpoint, request/response model |
| Database | New table, column, migration, model change |
| Service | New/modified service (auth, storage, billing, AI models) |
| Feature | User-facing capability spanning multiple layers |
| Bug Fix | Fix to existing behavior |
| Refactor | Structural change, no new behavior |
| Config | CI/CD, dependencies, environment, Makefile |
Step 2: Map the Blast Radius
Based on the category, identify every file and layer that will be touched.
Start with docs — they describe the architecture and file paths:
- — directory structure, layer descriptions
docs/architecture/overview.md - — pipeline node/tool/graph patterns
docs/architecture/pipelines.md - — pipeline execution flow
docs/architecture/process-flow.md - — code patterns, key file paths, service descriptions
AGENTS.md - — API endpoints
docs/api/reference.md - — migration process
docs/development/migrations.md - — test structure
docs/development/testing.md
Only read source code when the docs don't answer something specific (e.g., checking current state keys in , or seeing what models exist in ).
src/pipelines/state.pysrc/api/models.pyPipeline Work
src/pipelines/state.py ← new state keys?
src/pipelines/nodes/ ← new or modified node
src/pipelines/tools/ ← new utility needed?
src/pipelines/graphs/ ← wire node into graphAPI Work
src/api/models.py ← request/response models (source of truth)
src/api/v1/routes.py ← user-facing routes
src/api/dashboard/v1/ ← dashboard routes
src/services/ ← business logic behind the endpointDatabase Work
src/core/models.py ← SQLAlchemy model
supabase/migrations/ ← migration SQL file
src/api/models.py ← if field is API-exposedService Work
src/services/ ← service implementation
src/core/config.py ← new env vars?
src/core/exceptions.py ← new exception types?Feature (spans layers)
Map each layer it touches using the categories above. Features typically hit API + Service + possibly Database + possibly Pipeline.
Step 3: Build the Checklist
Create a checklist specific to this task. Include items from ALL relevant categories.
Always Include
- Read existing code in the area before writing anything
- Follow absolute imports ()
from src.module import thing - Full type annotations on all functions
- in new files
logger = logging.getLogger(__name__) - No bare — specify exception types
except: - No in
print()src/
If Pipeline
- Node is with
asyncdecorator@traceable(name="...") - Node takes , returns partial
PipelineStatedict - tracked (start/elapsed/update pattern)
step_timings - New state keys added to in
PipelineStatestate.py - Tools are pure — no LLM calls, no service imports
- if processing pages in parallel
asyncio.Semaphore - Cost tracking via for LLM calls
cost_tracking.py - Node wired into graph with correct edges
If API
- Request/response models in
src/api/models.py - Route follows existing patterns (auth, error handling)
- Rate limiting applied if user-facing
- Proper HTTP status codes
- Response model matches what frontend expects
If Database
- SQLAlchemy model updated in
src/core/models.py - Migration file:
supabase/migrations/YYYYMMDDHHMMSS_name.sql - /
IF NOT EXISTSfor idempotencyIF EXISTS - RLS enabled on tables with
user_id - Indexes on foreign keys and query columns
- not
TIMESTAMPTZTIMESTAMP - not
JSONBJSON
If Service
- Service handles its own errors (try/except with logging)
- External calls have timeouts
- New env vars added to
src/core/config.py - Service is injectable/mockable for testing
If Config/CI
- still passes
make quick-check - CI workflow updated if new test markers or steps needed
Testing (Always)
- Unit tests for new functions (mocked dependencies)
- Integration tests if multi-component interaction
- Use existing fixtures from
tests/conftest.py - or
@pytest.mark.uniton every test@pytest.mark.integration - for async tests
@pytest.mark.asyncio - Tests pass:
uv run pytest <test_file> -v
Documentation (Always)
- Update relevant docs if behavior/architecture changed
- Update if new patterns introduced
AGENTS.md
Step 4: Recommend Skills
Based on the task, recommend which skills to run and when:
| When | Skill | Reason |
|---|---|---|
| After coding | | Generate tests for new code |
| After pipeline work | | Validate node contracts and tool purity |
| After coding | | Catch pattern violations |
| If DB changed | | Create migration properly |
| If API changed | | Check cross-repo impact |
| Before commit | | Final go/no-go |
Only recommend skills that are relevant to this specific task.
Output Format
## Prepare: [short task title]
### Scope
[1-2 sentence summary of what this task involves]
### Category
[Pipeline / API / Database / Service / Feature / Bug Fix / Refactor]
### Files to Touch
- `path/to/file.py` — what to do here
- `path/to/other.py` — what to do here
### Checklist
- [ ] item 1
- [ ] item 2
- [ ] ...
### Skills to Run
1. After coding → `/test-gen path/to/new_file.py`
2. After coding → `/pipeline-check` (if pipeline)
3. Before commit → `/pre-commit`
### Watch Out For
[Anything tricky or easy to miss for this specific task]Rules
- Read docs first, code second. The directory and
docs/describe architecture, file paths, and patterns. Only read source code when the docs don't answer something specific. This saves tokens and is faster.AGENTS.md - Be specific — reference real file names, real function names, real state keys.
- Don't over-scope — only include checklist items relevant to this task.
- Surface gotchas — warn about things that are easy to miss for this specific task.