pseudocode-extractor
Installation
SKILL.md
Pseudocode Extractor
Real code has type annotations, error handling, logging, defensive checks, and language-specific idioms. Pseudocode has the algorithm. Extraction is deciding what's essential vs. what's machinery.
Compare → verified-pseudocode-extractor: that one preserves pre/post/invariants from verified code. This one works on any code and focuses on algorithmic clarity.
Keep vs. strip
| Source code element | In pseudocode |
|---|---|
| Core control flow (if/while/for) | KEEP — this is the algorithm |
| Data transformations | KEEP — the what |
| Variable types | STRIP usually; KEEP if the type is the point (e.g., "priority queue") |
| Error handling (try/catch) | STRIP unless the error path is algorithmic |
| Logging, metrics, tracing | STRIP |
| Defensive null checks | STRIP (or note as precondition) |
| Resource management (open/close) | STRIP (becomes "with resource R: ...") |
| Memory management | STRIP entirely |
Language idioms (__enter__, RAII) |
STRIP — translate to intent |