Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/lazylagom/context-compose-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/lazylagom/context-compose-mcp/debugging-troubleshooting)<a href="https://agentmods.dev/rules/lazylagom/context-compose-mcp/debugging-troubleshooting"><img src="https://agentmods.dev/badge/rules/lazylagom/context-compose-mcp/debugging-troubleshooting/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/lazylagom/context-compose-mcp/debugging-troubleshooting"><img src="https://agentmods.dev/badge/rules/lazylagom/context-compose-mcp/debugging-troubleshooting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01008 |
| Opus 5.5 | $0.00000 | $0.00403 |
| Sonnet 5.5 | $0.00000 | $0.00202 |
| Haiku 4.5 | $0.00000 | $0.00101 |
Grade C, and why
debugging-troubleshooting scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf node_modules pnpm-lock.yaml How it starts
The opening of the file, as written. The whole thing — 192 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Debugging and Troubleshooting Guide
General Debugging Strategies
Logging and Console Output
- Development Mode: Output debugging information using
console.log - Structured Logging: Structured log messages in JSON format
- Error Stack Tracing: Include detailed error information and stack traces
TypeScript Type Errors
- Type Checking: Check entire project types with
npm run type-check - Gradual Type Application: Minimize
anytype usage and define specific types - Type Guards: Ensure type safety at runtime
MCP Server Debugging
MCP Server Inspection Tools
# Inspect MCP server under development
npm run inspect
# Inspect built MCP server
npm run inspect:built
Common MCP Issues
1. Tool Registration Failure
// Incorrect example
server.tool('invalid-tool', {
// Missing parameter schema
}, handler);
// Correct example
server.tool('valid-tool', {
description: 'Clear description',
parameters: z.object({
param: z.string().describe('Parameter description')
})
}, handler);
2. Type Mismatch Issues
- Zod Schema Validation: Type validation of input parameters
- TypeScript Type Definitions: Compile-time type safety
3. Asynchronous Processing Errors
// Properly handle Promise chains
server.tool('async-tool', schema, async (params) => {
try {
const result = await someAsyncOperation(params);
return { result };
} catch (error) {
throw new Error(`Operation failed: ${error.message}`);
}
});
CLI Debugging
CLI Command Testing
# Run CLI in local development mode
npm run context-compose -- --help
# Debug specific commands
npm run context-compose -- get-context default --verbose
Common CLI Issues
1. Command Parsing Errors
- Commander.js Configuration Check: Review command definitions in src/cli/index.ts
- Argument Validation: Distinguish between required and optional arguments
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 192 lines · 0 tokens per session scan C a38de5a86d50
debugging-troubleshooting is a cursor rule published in the GitHub repository lazylagom/context-compose-mcp (1 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,008 tokens. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
logging-standards
Use the Operative Control Center logging system instead of print statements.
debug-commands
This tool performs debugging steps for applications.
tools
MCP tool development patterns — factory pattern, base class, callbacks, and descriptions.
code-optimization
Guidelines for optimizing duplicate and poorly structured code.
debugging
Debugging guidance for the Lineai MCP Server.
composer-debugging
Failing tests, errors, flaky behavior, or a bug with no clear line — reproduce, trace the data, fix the cause, prove it with one scoped test.