Help developers create and maintain `docs/package-effects.md` - the source of truth for effect classification in a package.
Analyzes code to discover and document all effects in a package, creating a `docs/package-effects.md` source of truth. Triggers when users ask to "define effects" or "map functions to effects" for a package.
/plugin marketplace add pietgk/vivief/plugin install devac@viviefThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Help developers create and maintain docs/package-effects.md - the source of truth for effect classification in a package.
From foundation.md: "Everything can be represented as effectHandlers"
runCode() === handleEffects(extractEffects(code))
DO:
devac effects initDON'T:
This skill activates when users ask about:
Analyze code to find patterns that represent effects:
Help developers classify discovered patterns into meaningful effect categories with proper metadata.
Compare documented effects against actual code to find gaps and stale mappings.
# Generate initial package-effects.md from AST analysis
devac effects init -p <package-path>
This creates a draft docs/package-effects.md with discovered patterns.
Open docs/package-effects.md and:
# Compare documented vs actual effects
devac effects verify -p <package-path>
Reports:
# Generate TypeScript extraction rules
devac effects sync -p <package-path>
Generates .devac/effect-mappings.ts from the documentation.
devac effects initGenerate initial docs/package-effects.md from code analysis.
devac effects init -p packages/user-service
devac effects init -p packages/user-service --threshold 3
devac effects verifyCheck if documented effects match actual code patterns.
devac effects verify -p packages/user-service
devac effects verify -p packages/user-service --json
devac effects syncGenerate .devac/effect-mappings.ts from documentation.
devac effects sync -p packages/user-service
devac effects listList all extracted effects in a package.
devac effects list -p packages/user-service
devac effects list -p packages/user-service --type Store
docs/package-effects.md# Package Effects: @myorg/user-service
<!--
This file defines effect mappings for this package.
Run `devac effects sync` to regenerate extraction rules.
Run `devac effects verify` to check for unmapped patterns.
-->
## Metadata
- **Package:** @myorg/user-service
- **Last Updated:** 2025-01-01
- **Verified:** true
## Store Operations
| Pattern | Store Type | Operation | Provider | Target |
|---------|------------|-----------|----------|--------|
| `userRepo.create` | database | insert | mysql | users |
| `userRepo.update` | database | update | mysql | users |
| `sessionCache.set` | cache | write | redis | sessions |
## Retrieve Operations
| Pattern | Retrieve Type | Operation | Provider | Target |
|---------|---------------|-----------|----------|--------|
| `userRepo.findById` | database | get | mysql | users |
| `sessionCache.get` | cache | read | redis | sessions |
## External Calls
| Pattern | Send Type | Service | Third Party |
|---------|-----------|---------|-------------|
| `stripeClient.*` | external | stripe | true |
| `sendgrid.send` | external | sendgrid | true |
## Request Handlers
| Class.Method | HTTP Method | Route | Framework |
|--------------|-------------|-------|-----------|
| `UserController.getUser` | GET | /users/:id | express |
| `UserController.createUser` | POST | /users | express |
User: "Help me define effects for the payment-service package"
Response approach:
devac effects init -p packages/payment-service to discover patternsdocs/package-effects.mdstripeClient.charges.create)devac effects verify to check for gapsdevac effects sync to generate extraction rulesUser: "The verify command shows unmapped patterns"
Response approach:
docs/package-effects.md with metadataProperly defined effects enable accurate C4 architecture diagrams:
# Generate C4 diagrams using effect data
devac c4 -p packages/user-service --level containers
Effects are classified and appear in diagrams:
Use these standard group types for classification:
| Group | Description | Filter Use |
|---|---|---|
io:filesystem | File system operations (fs.*, glob) | Architecture docs |
io:database | Database operations (DuckDB, SQL) | Data flow diagrams |
io:network | External calls, HTTP, subprocess | Integration docs |
compute:utility | Pure transformations (path., JSON., Date.*) | Usually filtered |
compute:transform | Data transformations | Internal only |
framework:cli | CLI framework patterns (Commander.js) | Usually filtered |
framework:test | Test framework patterns (Vitest, Jest) | Usually filtered |
logging:diagnostic | Logging (console., logger.) | Usually filtered |
workflow:hub | Hub federation operations | Workflow docs |
When generating docs or diagrams, filter by group:
io:* groupsworkflow:* groupsdevac effects init to get ALL patternsdevac effects verify in CI to catch drift - goal is 0 unmapped/explain-package skillThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.