nilenso/context-viewer/context-analysis-skill
Claude Code and agent skill by nilenso/context-viewer
- community
Checking that the SKILL.md file is still in the repository.
Analyze plain text documents to understand their semantic structure and token distribution. Use when asked to analyze context, visualize token usage, segment text, identify components, create waffle charts, or compare multiple documents.
Install
npx vskill@latest install nilenso/context-viewer/context-analysis-skillSKILL.md
Context Analysis
Analyze plain text documents to understand their semantic structure and token distribution. This skill helps visualize how tokens are distributed across different semantic components of a document.
Workflow
When analyzing a document, follow these steps:
1. Parse the Text
Convert the input text file to JSON format:
2. Count Tokens
Add token counts using tiktoken (GPT-4o encoding):
3. Segment Large Parts
For parts with more than 500 tokens, identify semantic breakpoints and split them.
You (Claude) should do this directly:
- Read the text of each large part
- Identify natural semantic boundaries (topic changes, section breaks, logical divisions)
- Split into coherent chunks
- Update the JSON with new parts (use IDs like
part-1.1,part-1.2, etc.)
After segmenting, recount tokens:
4. Identify Components
Analyze the document and identify the distinct semantic components it contains.
You (Claude) should do this directly:
- Read all parts
- Identify categories/themes (e.g., "introduction", "methodology", "examples", "conclusion")
- Assign each part to a component
- Add to JSON:
componentsarray andcomponentfield on each part - Calculate
component_tokenstotals
5. Assign Colors
Run the colorization script to assign consistent colors:
6. Generate Visualizations
Quick Commands
For a complete analysis pipeline:
For multiple files:
Data Format
The JSON format used throughout:
Segmentation Guidelines
When segmenting large parts (>500 tokens):
- Look for natural breakpoints:
- Markdown headings (
#,##, etc.) - Topic transitions
- Logical section boundaries
- List groupings
- Create semantically coherent chunks:
- Each segment should cover one topic/concept
- Aim for 100-500 tokens per segment
- Preserve context within segments
- Update IDs hierarchically:
part-1splits intopart-1.1,part-1.2, etc.
Component Identification Guidelines
When identifying components:
- Read all parts to understand the document structure
- Identify 3-10 distinct semantic categories
- Use descriptive, lowercase names with underscores
- Common patterns:
- Documents:
introduction,methodology,results,conclusion - Technical:
configuration,implementation,examples,api_reference - Instructional:
overview,prerequisites,steps,troubleshooting
- Assign each part to exactly one component
- Use
otherfor parts that don't fit elsewhere
Available Colors
Components are assigned these colors:
blue- Primary content, introductionsemerald- Workflows, processes, methodologypurple- Style, personality, guidelinesorange- Context, examples, highlightsindigo- Code, technical contentslate- Environment, configurationgray- Tools, utilities, other
References
See the references/ folder for detailed documentation on each step.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcontext-analysis-skill/SKILL.md
Popularity
- Repository stars
- 90
- Repository forks
- 3
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nilenso/context-viewer/context-analysis-skill)