codemap_script_list
List user-defined scripts by category. Shows validation status and paths.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
category | stringaudit | build | orient | close | utility | ❌ Optional | Optional category filter (if omitted, lists all scripts) |
Usage Examples
MCP Usage (for AI Agents like Claude)
json
{
"name": "codemap_script_list"
}Example Output
JSON Response
json
{
"success": true,
"totalScripts": 3,
"filter": "all",
"scripts": {
"audit": [
{
"name": "check-imports",
"category": "audit",
"path": ".codemap/scripts/audit/check-imports.js"
}
],
"build": [
{
"name": "pre-commit",
"category": "build",
"path": ".codemap/scripts/build/pre-commit.js"
}
],
"utility": [
{
"name": "stats",
"category": "utility",
"path": ".codemap/scripts/utility/stats.js"
}
]
},
"categories": {
"audit": "Custom validation rules",
"build": "Build automation",
"orient": "Session orientation contributions",
"close": "Session cleanup and validation",
"utility": "Temporary helper scripts (purged on close)"
}
}When to Use This Tool
- Discover available scripts
- Verify script installation
- Audit script collection
- Before creating new scripts
- Team onboarding
Common Patterns
Check Script Exists
Count by Category
const scripts = await codemap.scripts.list('audit');
const exists = scripts.some(s => s.name === 'validate');Count by Category
const audit = await codemap.scripts.list('audit');
const build = await codemap.scripts.list('build');
console.log(Audit: ${audit.length}, Build: ${build.length});Pro Tips
List before operations - Always check what exists before creating/deleting
Filter by category - Use category parameter to narrow results
Check utility scripts - Utility scripts are temporary and purged on close
Filter by category - Use category parameter to narrow results
Check utility scripts - Utility scripts are temporary and purged on close
Best Practices
Document scripts - Keep README updated with available scripts
Regular audits - Periodically review and clean up unused scripts
Validate setup - In CI, verify required scripts exist
Regular audits - Periodically review and clean up unused scripts
Validate setup - In CI, verify required scripts exist
Common Mistakes
❌ Mistake: Assuming scripts exist
✅ Instead: Verify first
await codemap.scripts.run('audit', 'validate');✅ Instead: Verify first
const scripts = await codemap.scripts.list('audit');
if (scripts.some(s => s.name === 'validate')) {
await codemap.scripts.run('audit', 'validate');
}