decomposition-library
Activate after every completed decomposition to offer saving. Activate when user says "save this", "add to library", "show my library", "what have I researched", "past decompositions", "have I done this before", or starts a decomposition on a topic that may already exist in the library. Always check library/ folder silently at the start of any new decomposition.
Best use case
decomposition-library is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Activate after every completed decomposition to offer saving. Activate when user says "save this", "add to library", "show my library", "what have I researched", "past decompositions", "have I done this before", or starts a decomposition on a topic that may already exist in the library. Always check library/ folder silently at the start of any new decomposition.
Teams using decomposition-library should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/decomposition-library/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How decomposition-library Compares
| Feature / Agent | decomposition-library | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Activate after every completed decomposition to offer saving. Activate when user says "save this", "add to library", "show my library", "what have I researched", "past decompositions", "have I done this before", or starts a decomposition on a topic that may already exist in the library. Always check library/ folder silently at the start of any new decomposition.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
## Design system — mandatory on all HTML artifacts
Every HTML artifact generated by this skill MUST follow this design system.
No exceptions. Never invent colours, never use dark backgrounds, never use
purple or blue as primary backgrounds.
**Palette:**
- Page background: `#fafaf8` (warm white)
- Card background: `white`
- Primary text: `#2c2c2c` (soft charcoal)
- Secondary text: `#6b6b6b`
- Muted text: `#9a9690`
- Accent / headers: `#1b5e52` (deep teal) — the ONLY accent colour
- Border: `#e0ddd6`
- Hover tint: `#f0f7f4`
- Warning/amber: `#fff8f0` background, `#f0d090` border, `#5a3a00` text
**Typography:**
- Body: `'Georgia', serif`, 14px minimum
- Monospace labels: `'Courier New', monospace`
- Never below 11px anywhere
**Component rules:**
- All section headers: `background: #1b5e52; color: white`
- Cards: `background: white; border: 1px solid #e0ddd6; border-radius: 8px`
- Buttons: `background: #1b5e52; color: white` for primary actions
- No gradients, no shadows, no dark backgrounds on outer containers
**Pill colour system:**
- Global company: `background:#e6f1fb; color:#0c447c; border:0.5px solid #85b7eb`
- India listed: `background:#eaf3de; color:#27500a; border:0.5px solid #97c459`
- India private: `background:#faeeda; color:#633806; border:0.5px solid #ef9f27`
- Flagged: `background:#fcebeb; color:#791f1f; border:0.5px solid #f09595`
- Neutral segment: `background:#f3f4f6; color:#374151; border:0.5px solid #d1d5db`
- Seeded: `background:#eaf3de; color:#27500a`
- Discovered: `background:#e6f1fb; color:#0c447c`
**Attribution footer — mandatory on every artifact:**
```html
<div style="margin-top:32px;padding-top:12px;border-top:1px solid #e0ddd6;
display:flex;justify-content:space-between;align-items:center;
font-family:'Courier New',monospace;font-size:10px;color:#9a9690">
<span>Curiosity Stack is not a SEBI registered investment advisor · Not investment advice · Makers accept no liability · For research only</span>
<a href="https://curiositystack.app" target="_blank"
style="color:#1b5e52;font-weight:700;text-decoration:none">
⬡ curiositystack.app
</a>
</div>
```
---
# Decomposition Library
## Purpose
A personal research library that grows with every session. Every completed decomposition can be saved locally as a structured file. The library is searchable, cross-referenceable, and optionally mirrored to Google Drive or Notion.
---
## Step 0 — Check on New Decomposition Start
At the start of every new decomposition, silently scan the `library/` folder for files whose topic name matches or is close to the current topic.
If a match is found, ask once:
```
I have a past decomposition on [topic] from [date].
Want me to pull it up? It could save us some ground.
1. Yes — load it as context
2. No — start fresh
```
If yes: load the file, surface the key layer conclusions, and use them as the starting point. Skip layers the user already has strong conclusions on unless they want to revisit.
If no: proceed normally. Do not ask again.
---
## Step 1 — Save Prompt After Output
After any output is generated (Value Chain, Mindmap, or Research Note), ask:
```
Save this decomposition to your library? (yes / no)
```
If the user has `library_save` set to `always` in `local.md` — save automatically without asking.
If no — skip. Do not ask again in the same session.
---
## Step 2 — What to Save
Save a structured `.md` file to the `library/` folder in the plugin directory.
**Filename format:** `YYYY-MM-DD-[topic-slug].md`
Example: `2026-03-13-grid-scale-battery-storage.md`
**File contents:**
```markdown
# [TOPIC]
*Decomposed: [Date] | Output: [Value Chain / Mindmap / Research Note]*
---
## Tags
- Sector: [sector]
- Geography: [India / Global / Both]
- Stage: [early / developing / mature]
---
## Layer Summaries
**L0 — Signal**
[2-3 line summary of the signal and why it matters now]
**L1 — Mechanics**
[2-3 line summary of what this actually is]
**L2 — Cause Tree**
[Key root causes identified — bullet list]
**L3 — Solution Space**
[Solution categories and which industries they map to]
**L4 — Build Requirements**
[Key inputs, infrastructure, talent, bottlenecks]
**L5 — Value Chain Actors**
Global: [key companies named]
India: [India proxy companies named with proxy pattern]
**L6 — Research Landscape**
[How the space is accessed, stage of development]
---
## Sources Cited
[List of sources referenced during this session]
---
## Conviction
Score: [blank — to be filled manually or via stress test]
Last reviewed: [date]
Next review trigger: [user-defined or blank]
---
## Notes
[Any freetext notes from the session]
```
---
## Step 3 — Mirror to Drive or Notion (if connected)
After saving locally, check `local.md` for connected sources.
If Google Drive is connected and `library_mirror` is set to `drive`:
```
Saved locally. Mirroring to your Google Drive —
I'll keep both in sync going forward.
```
If Notion is connected and `library_mirror` is set to `notion`:
```
Saved locally. Adding to your Notion research database.
```
If both connected, use whichever is set as primary in `local.md`.
If neither set, ask once:
```
Want me to also back this up to your connected Drive or Notion?
This keeps your library accessible across devices.
1. Google Drive
2. Notion
3. Local only
```
Save their answer to `local.md` as `library_mirror` — never ask again.
---
## `/curiosity-stack:library` Command
When user runs this command, present:
```
Your Decomposition Library
[X] decompositions saved
Recent:
→ [topic] — [date] — [output type]
→ [topic] — [date] — [output type]
→ [topic] — [date] — [output type]
Options:
1. Search by topic
2. Search by sector or tag
3. Open a specific decomposition
4. Delete a decomposition
5. Export full library to Drive / Notion
```
Search scans filenames and tag fields. Opening a decomposition loads it as context and offers to run a layer delta — comparing it against a fresh decomposition on the same topic to show what has changed.
---
## local.md additions
After setup Section 6, add these fields to `curiosity-stack.local.md`:
```yaml
library_save: always / ask / never
library_mirror: drive / notion / local
library_count: [auto-incremented integer]
```Related Skills
scenario-library
Activate when user says "I don't know what to research", "give me ideas", "what can I decompose", "show me scenarios", "browse topics", "not sure where to start", "what topics are available", or runs /curiosity-stack:scenarios. Also activate on first session if local.md session_count is 0 or empty — surface the library automatically after the welcome message. Never activate mid-decomposition.
watchlist-tracker
Activate when Cowork is opened and watchlist monitoring cadence has elapsed. Activate when user says "check my watchlist", "what's new on my watchlist", "run watchlist", "any updates", "watchlist digest", or configures monitoring via /curiosity-stack:watchlist command. ALSO activate immediately — opening the watchlist UI — when user says any of: "add to watchlist", "add this to watchlist", "watch this", "monitor this", "put this on my watchlist", "track this", "add [topic] to watchlist". When triggered by an add request, open the UI with the topic pre-filled. Do NOT activate on every session — check last_run date in local.md first.
thesis-stress-test
Activate when user runs /curiosity-stack:stress-test or says "stress test this", "challenge this thesis", "what could go wrong", "bull vs bear", or after a decomposition output when user wants to pressure-test their conclusion.
source-guide
Activate when user asks where to find information at any layer, or when they are stuck and need pointers to go deeper. Always check connected personal sources first.
source-credibility
Activate at Layer 1 and Layer 5 of any decomposition to surface the user's highest-rated sources for the current sector and layer. Activate after any session to prompt source rating. Activate when user says "rate this source", "how good is [source]", "which sources should I use for [sector]", or "update my sources". Never activate mid-conversation unless at L1 or L5 transition.
setup
Activate on first use or when user says "setup", "configure", "connect my notes", "link my drive", "how do I connect", or on first session with no prior configuration. Also reads curiosity-stack.local.md if it exists — skip steps already answered there.
sebi-compliance
ALWAYS active. Apply to every single response, every output, every command in this plugin. This skill takes absolute priority over all other skills. Never disabled, never overridden. Intercept and redirect any request that crosses into investment advice territory.
reading-list
Activate after every completed decomposition to generate 5 curated reading recommendations specific to the topic and layers explored. Also activate when user asks "what should I read", "where do I go deeper", "give me links", "reading list", or "resources on this".
output-generator
Activate when a user selects their output format after completing a decomposition. Generates exactly one of: Value Chain diagram, interactive Mindmap, Research Note, or Research Brief PDF. Never generate all — only what was selected. Always include SEBI disclaimer, attribution badge, and invisible source comment.
domain-knowledge
Manages the user's personal domain knowledge registry — company intelligence seeded per sector that the India Proxy Agent uses before searching. Activates when user runs /curiosity-stack:knowledge, says "manage my domain knowledge", "add company to my knowledge", or clicks the "missed company" add form after an India Proxy Agent run. Also activates after any India Proxy Agent output to surface the inline add prompt.
curiosity-framework
The core 6-layer decomposition framework. Activates when a user describes any topic, technology, market signal, or global event. Also activates when a scenario card is clicked via sendPrompt, or when /curiosity-stack:decompose is run. Guides the user through L0 to L6 using Socratic conversation — one layer at a time.
company-discovery
Activate when user wants to find actual companies in a value chain layer, especially Indian proxies for global themes. Always check connected sources first. Always apply SEBI compliance — research framing only.