/memstack:shardfrom memstack
Splits monolithic files over 1000 lines into focused, maintainable modules. Analyzes structure, proposes a split plan, executes refactoring with import updates, and verifies the build.
Ships in memstack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Split monolithic files into focused, maintainable modules.
When this skill activates, output:
💎 Shard: Refactoring large file...
Then execute the protocol below.
| Context | Status |
|---|---|
| User says "shard", "split file", or "refactor" | ACTIVE: full protocol |
| Editing a file over 1000 lines | ACTIVE: suggest refactor |
| User says "refactor" for logic changes (not splitting) | DORMANT: not a shard task |
| Discussing code organization concepts | DORMANT: do not activate |
| File is under 500 lines | DORMANT: not worth splitting |
Identify the target file and count lines:
wc -l <file>
Analyze structure:
Propose the split: present to user BEFORE executing:
Execute the refactor:
Verify build:
npm run build 2>&1 | tail -20
Present result: new file structure with line counts
User: "shard infrastructure/page.tsx: it's 1100 lines"
💎 Shard: Refactoring large file...
infrastructure/page.tsx (1,110 lines) → 6 files:
page.tsx (~120 lines), Main page, tab switcher
RailwayTab.tsx (~200 lines), Railway monitoring
HetznerTab.tsx (~180 lines), Hetzner monitoring
HeadroomTab.tsx (~250 lines), Headroom + setup guide
types.ts (~80 lines), Shared interfaces
constants.ts (~60 lines): Status configs
Build check: ✓ passed
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub cwinvestments/memstack --plugin memstack87 skills in this plugin
/memstack-seo-ai-search-visibilityUse this skill when the user says 'AI search', 'AI visibility', 'ChatGPT ranking', 'Perplexity optimization', 'GEO', 'generative engine optimization', or needs to optimize content for AI-powered search engines and LLM citations. Do NOT use for traditional SEO audits or Google Ads./memstack-security-api-auditUse this skill when the user says 'audit API', 'check API security', 'API routes security', 'endpoint audit', 'check my routes', or needs to verify API route protection. Reviews API endpoints for authentication, authorization, and input validation gaps. Do NOT use for frontend security headers or dependency scanning./memstack-development-api-designerUse this skill when the user says 'design API', 'API endpoints', 'REST API', 'API designer', 'route structure', 'API architecture', or is designing RESTful API routes, request/response schemas, and endpoint organization. Do NOT use for API security audits or database design.Other plugins' skills for the same job