Actions Reference
Complete reference for all HMS actions.
Overview
Actions define what a step does. Each action maps to specific tools in different IDEs.
Available Actions
analyze_code
Analyze existing code for patterns, issues, or information.
Use cases:
- Bug investigation
- Code review
- Architecture analysis
- Security audit
Parameters:
| Parameter | Type | Description |
|---|---|---|
files | string[] | Files to analyze |
focus | string | What to look for |
Example:
{
"id": "find_bugs",
"name": "Find bugs in authentication",
"action": "analyze_code",
"parameters": {
"files": ["src/auth/**/*.ts"],
"focus": "security vulnerabilities, edge cases"
}
}IDE Mappings:
| IDE | Tools Used |
|---|---|
| Claude | Read, Grep, Glob |
| Cursor | @file reference |
| Codex | analyze_code() function |
edit_file
Edit a single file.
Use cases:
- Bug fixes
- Small refactors
- Configuration changes
Parameters:
| Parameter | Type | Description |
|---|---|---|
files | string[] | File(s) to edit (first used) |
focus | string | What changes to make |
Example:
{
"id": "fix_bug",
"name": "Fix authentication bug",
"action": "edit_file",
"parameters": {
"files": ["src/auth/login.ts"],
"focus": "fix password validation"
}
}IDE Mappings:
| IDE | Tools Used |
|---|---|
| Claude | Edit |
| Cursor | Inline diff |
| Codex | edit_file() function |
edit_files
Edit multiple files together.
Use cases:
- Refactoring across files
- Feature implementation
- Bulk updates
Parameters:
| Parameter | Type | Description |
|---|---|---|
files | string[] | Files to edit |
focus | string | What changes to make |
Example:
{
"id": "refactor_api",
"name": "Refactor API layer",
"action": "edit_files",
"parameters": {
"files": [
"src/api/users.ts",
"src/api/auth.ts",
"src/api/types.ts"
],
"focus": "use consistent error handling"
}
}IDE Mappings:
| IDE | Tools Used |
|---|---|
| Claude | Edit + Task (sub-agent) |
| Cursor | Composer multi-file |
| Codex | edit_files() function |
generate_code
Generate new code from scratch.
Use cases:
- New features
- New files
- Boilerplate generation
Parameters:
| Parameter | Type | Description |
|---|---|---|
files | string[] | Target file paths |
focus | string | What to generate |
Example:
{
"id": "create_api",
"name": "Create user API",
"action": "generate_code",
"parameters": {
"files": ["src/api/users.ts"],
"focus": "CRUD endpoints for user management"
}
}IDE Mappings:
| IDE | Tools Used |
|---|---|
| Claude | Write |
| Cursor | New file generation |
| Codex | generate_code() function |
generate_tests
Generate test files for existing code.
Use cases:
- Unit tests
- Integration tests
- Test coverage improvement
Parameters:
| Parameter | Type | Description |
|---|---|---|
files | string[] | Files to test |
test_framework | string | Testing framework |
coverage_target | number | Target coverage % |
Example:
{
"id": "write_tests",
"name": "Write unit tests",
"action": "generate_tests",
"parameters": {
"files": ["src/auth/login.ts"],
"test_framework": "Jest",
"coverage_target": 80
}
}IDE Mappings:
| IDE | Tools Used |
|---|---|
| Claude | Write + Bash |
| Cursor | Test file generation |
| Codex | generate_tests() function |
execute_command
Run a shell command.
Use cases:
- Running tests
- Build processes
- Linting
- Deployment scripts
Parameters:
| Parameter | Type | Description |
|---|---|---|
command | string | Shell command to run |
Example:
{
"id": "run_tests",
"name": "Run test suite",
"action": "execute_command",
"parameters": {
"command": "npm test -- --coverage"
}
}IDE Mappings:
| IDE | Tools Used |
|---|---|
| Claude | Bash |
| Cursor | Terminal |
| Codex | execute_command() function |
Commands run in the IDE's environment. Ensure they're safe and don't require user input.
search_references
Search for code references, usages, or patterns.
Use cases:
- Finding usages
- Impact analysis
- Code discovery
Parameters:
| Parameter | Type | Description |
|---|---|---|
focus | string | What to search for |
files | string[] | Scope of search |
Example:
{
"id": "find_usages",
"name": "Find all usages of deprecated API",
"action": "search_references",
"parameters": {
"focus": "deprecatedFunction",
"files": ["src/**/*.ts"]
}
}IDE Mappings:
| IDE | Tools Used |
|---|---|
| Claude | Grep, Glob |
| Cursor | @codebase search |
| Codex | search_references() function |
design_architecture
Create architectural designs and documentation.
Use cases:
- System design
- API design
- Documentation
- Planning
Parameters:
| Parameter | Type | Description |
|---|---|---|
focus | string | What to design |
files | string[] | Output files |
Example:
{
"id": "design_system",
"name": "Design authentication system",
"action": "design_architecture",
"parameters": {
"focus": "OAuth2 flow with JWT tokens",
"files": ["docs/auth-design.md"]
}
}IDE Mappings:
| IDE | Tools Used |
|---|---|
| Claude | Read + Write |
| Cursor | Documentation generation |
| Codex | design_architecture() function |
review_and_commit
Review changes and commit to version control.
Use cases:
- Final review
- Commit changes
- PR preparation
Parameters:
| Parameter | Type | Description |
|---|---|---|
focus | string | Review focus |
Example:
{
"id": "commit_changes",
"name": "Review and commit",
"action": "review_and_commit",
"parameters": {
"focus": "ensure no debug code, proper commit message"
}
}IDE Mappings:
| IDE | Tools Used |
|---|---|
| Claude | Bash (git) |
| Cursor | Git integration |
| Codex | review_and_commit() function |
Action Selection Guide
What do you need to do?
│
├── Read/understand code → analyze_code
│
├── Modify code
│ ├── Single file → edit_file
│ └── Multiple files → edit_files
│
├── Create new code
│ ├── Application code → generate_code
│ └── Test code → generate_tests
│
├── Run something → execute_command
│
├── Find code → search_references
│
├── Plan/document → design_architecture
│
└── Finalize → review_and_commitCombining Actions
Actions are most powerful when combined in workflows:
{
"steps": [
{ "id": "analyze", "action": "analyze_code" },
{ "id": "design", "action": "design_architecture", "depends_on": ["analyze"] },
{ "id": "implement", "action": "edit_files", "depends_on": ["design"] },
{ "id": "test", "action": "generate_tests", "depends_on": ["implement"] },
{ "id": "verify", "action": "execute_command", "depends_on": ["test"] },
{ "id": "commit", "action": "review_and_commit", "depends_on": ["verify"] }
]
}