pisan-labs

Code Analogy Forge — Development skill for Claude Code

Development community

Paste a code snippet or name a CS concept and get three analogies from everyday domains, each with a table mapping code terms to the analogy, written for a child, a high schooler, a CS undergraduate o.

How to install Code Analogy Forge

This entry records only its repository, not the path inside it, so there is no exact command to give. Open pisan-labs/code-analogy-forge and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Code Analogy Forge does

Paste a code snippet or name a CS concept and get three analogies from everyday domains, each with a table mapping code terms to the analogy, written for a child, a high schooler, a CS undergraduate or a non-technical adult. 47 concepts, hand-written, no AI calls. Built with Claude Code.

Alternatives in Development

  • Obsidian Connect — Bridge two unrelated domains using your vault's link graph — forces creative friction to spark new ideas 277 ★
  • Glossary — Terms and Definitions for the Top 100 Claude Code Recipes This glossary defines technical terms, business acro 238 ★
  • Contract Review Skill — Review legal contracts for risks, extract key terms, and suggest redlines 192 ★

README

Code Analogy Forge

Paste any code snippet or name a CS concept, pick your audience, and get **three sharply framed analogies from different everyday domains**, ready for a lecture slide, a blog post, or a meeting with stakeholders.

Live: ****

![Pasting a recursive factorial function detects recursion from its self-call and forges three analogies (post office, school, cooking) with code-to-analogy tables, then switching the audience to curious child and non-technical adult rewrites every card](demo.gif)

Built from idea 2026-08-25 n1 in [pisanuw/daily-project-ideas](https://github.com/pisanuw/daily-project-ideas).

What it does

  • Audience calibration. Every analogy is hand-written in four variants: curious child, high school student, CS undergraduate, and non-technical adult. Switching the audience swaps the entire text, not just the vocabulary: the undergraduate variant ties the imagery to formal terms (invariants, O(log n), the call stack), the child variant keeps only the imagery.
  • Three domains per concept. Each concept ships analogies from three distinct everyday domains (cooking, sports, city planning, post office, board games, ...), each with a "this maps to that" table connecting code terms to the analogy.
  • A bundled example per concept. The "Try an example" menu loads 47 snippets across JavaScript, Python, Java, C, SQL, HTTP, and shell (Fibonacci, a closure counter factory, a seeded shuffle, a traceroute, an HTTP exchange, a unit test, ...), grouped like the concepts and each test-pinned to rank its intended concept first.
  • Concept detection. Paste real code and a hand-written detector figures out what it shows: keyword mentions ("hash map", "recursion") plus code-shape patterns (a while loop, lo/hi/mid bounds, .push() + .pop(), a function whose body calls itself, found by brace-matching or Python indentation). Detected concepts are ranked with visible evidence, and chips let yo