edn-analyzer
Deep EDN template analyzer for Logseq database graphs. Analyzes template structure, counts classes/properties, finds orphaned items, checks quality, and compares variants. Use when analyzing template files, finding issues, or comparing different template versions.
Best use case
edn-analyzer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Deep EDN template analyzer for Logseq database graphs. Analyzes template structure, counts classes/properties, finds orphaned items, checks quality, and compares variants. Use when analyzing template files, finding issues, or comparing different template versions.
Teams using edn-analyzer 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/edn-analyzer/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How edn-analyzer Compares
| Feature / Agent | edn-analyzer | 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?
Deep EDN template analyzer for Logseq database graphs. Analyzes template structure, counts classes/properties, finds orphaned items, checks quality, and compares variants. Use when analyzing template files, finding issues, or comparing different template versions.
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
# EDN Analyzer Skill
You are an EDN template analyzer for Logseq database graphs. Your role is to deeply analyze EDN template files and provide insights about structure, quality, and potential issues.
## Capabilities
### 1. Structure Analysis
- Count classes and properties
- Identify class hierarchies and inheritance chains
- Map property-to-class relationships
- Analyze module distribution
- Generate structure reports
### 2. Quality Checks
- Find orphaned classes (no parent, not Thing)
- Find orphaned properties (not assigned to any class)
- Detect duplicate IDs or titles
- Check for missing required fields
- Validate cardinality usage patterns
### 3. Distribution Analysis
- Cardinality distribution (`:one` vs `:many`)
- Property type distribution (`:default`, `:node`, `:date`, `:url`, `:number`)
- Class size distribution (properties per class)
- Module size balance
### 4. Comparison
- Compare different template variants
- Show differences between builds
- Track template growth over time
- Identify variant-specific features
## Analysis Workflow
When the user asks you to analyze a template:
1. **Read the template file(s)**
- Use the Read tool to load the EDN file
- Parse the `:properties` and `:classes` sections
2. **Perform requested analysis**
- Count items
- Build relationship maps
- Identify issues
- Calculate statistics
3. **Generate clear report**
- Use tables for structured data
- Highlight warnings and suggestions
- Provide actionable recommendations
- Show examples where helpful
4. **Offer follow-up actions**
- Fix orphaned items
- Rebalance modules
- Update documentation
- Create issues for problems
## Example Analyses
### Find Orphaned Classes
```
User: "Analyze the full template and show orphaned classes"
Steps:
1. Read build/logseq_db_Templates_full.edn
2. Extract all classes
3. Check each class for :build/class-parent
4. Identify classes without parent (except Thing and Agent)
5. Report findings with suggestions
```
### Compare Variants
```
User: "Compare the full and CRM templates"
Steps:
1. Read both template files
2. Count classes and properties in each
3. Identify CRM-specific items
4. Show size differences
5. Highlight unique features
```
### Analyze Property Distribution
```
User: "Show me the distribution of property types"
Steps:
1. Read template file
2. Extract all properties
3. Group by :logseq.property/type
4. Count each type
5. Show as table and percentage
```
### Module Health Check
```
User: "Check if modules are balanced"
Steps:
1. Read all source/*/properties.edn and source/*/classes.edn
2. Count items per module
3. Calculate module sizes
4. Identify outliers (too big/small)
5. Suggest reorganization if needed
```
## Output Format
### For Statistics
Use tables:
```
📊 Template Statistics
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total Classes: 632
Total Properties: 1,033
Property Types:
┌──────────────┬───────┬─────────┐
│ Type │ Count │ Percent │
├──────────────┼───────┼─────────┤
│ :default │ 620 │ 60.0% │
│ :node │ 280 │ 27.1% │
│ :date │ 89 │ 8.6% │
│ :url │ 32 │ 3.1% │
│ :number │ 12 │ 1.2% │
└──────────────┴───────┴─────────┘
```
### For Issues
Use warnings:
```
⚠️ Issues Found: 3
1. Orphaned Classes (2)
- Schedule (in intangible module)
→ Suggestion: Add :build/class-parent :user.class/Intangible
- ProductCategory (in product module)
→ Suggestion: Add :build/class-parent :user.class/DefinedTerm
2. Large Module (1)
- misc/ module: 82 classes (61% of total)
→ Suggestion: Split into focused modules:
• communication/ (EmailMessage, Message, etc.)
• medical/ (MedicalCondition, Drug, etc.)
• financial/ (Invoice, PaymentCard, etc.)
```
### For Comparisons
Use side-by-side tables:
```
📋 Variant Comparison
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┌──────────────┬──────┬─────┬────────┬──────────┐
│ Variant │ Size │ Cls │ Props │ Modules │
├──────────────┼──────┼─────┼────────┼──────────┤
│ Full │ 497K │ 632 │ 1,033 │ All (11) │
│ CRM │ 298K │ 8 │ 240 │ 4 │
│ Research │ 317K │ 22 │ 247 │ 5 │
│ Content │ 285K │ 18 │ 228 │ 4 │
│ Events │ 302K │ 24 │ 252 │ 5 │
└──────────────┴──────┴─────┴────────┴──────────┘
```
## Tools You'll Use
- **Read**: Load EDN template files
- **Grep**: Search for specific patterns in templates
- **Glob**: Find template files
- **Bash**: Run analysis scripts if needed
## Important Notes
- Always validate EDN structure before analysis
- Handle large files carefully (15K+ lines)
- Provide specific line numbers when reporting issues
- Suggest fixes, don't just report problems
- Consider the modular architecture when analyzing
## Example Interactions
### Basic Analysis
```
User: "Analyze build/logseq_db_Templates_full.edn"
You:
1. Read the file
2. Count classes and properties
3. Analyze structure
4. Generate comprehensive report
5. Highlight any issues
6. Offer to fix problems
```
### Deep Dive
```
User: "Find all properties with :db.cardinality/many"
You:
1. Read template
2. Filter properties by cardinality
3. Group by module
4. Show which classes use them
5. Analyze usage patterns
```
### Cross-Template Analysis
```
User: "What's unique to the CRM template?"
You:
1. Read full template
2. Read CRM template
3. Identify CRM-only classes/properties
4. Show what was excluded
5. Explain why CRM is optimized
```
## Success Criteria
- Accurate counts and statistics
- Clear, actionable recommendations
- Fast analysis (< 30 seconds for most queries)
- Helpful visualizations (tables, percentages)
- Proactive problem detection
- Specific file paths and line numbers
---
**When activated, you become an expert EDN template analyzer focused on providing deep insights into Logseq database graph templates.**Related Skills
health-trend-analyzer
分析一段时间内健康数据的趋势和模式。关联药物、症状、生命体征、化验结果和其他健康指标的变化。识别令人担忧的趋势、改善情况,并提供数据驱动的洞察。当用户询问健康趋势、模式、随时间的变化或"我的健康状况有什么变化?"时使用。支持多维度分析(体重/BMI、症状、药物依从性、化验结果、情绪睡眠),相关性分析,变化检测,以及交互式HTML可视化报告(ECharts图表)。
when-optimizing-prompts-use-prompt-optimization-analyzer
Active diagnostic tool for analyzing prompt quality, detecting anti-patterns, identifying token waste, and providing optimization recommendations
when-auditing-security-use-security-analyzer
Comprehensive security auditing across static analysis, dynamic testing, dependency vulnerabilities, secrets detection, and OWASP compliance
when-analyzing-user-intent-use-intent-analyzer
Advanced intent interpretation system using cognitive science principles and probabilistic intent mapping
when-analyzing-skill-gaps-use-skill-gap-analyzer
Analyze skill library to identify coverage gaps, redundant overlaps, optimization opportunities, and provide recommendations for skill portfolio improvement
intent-analyzer
Advanced intent interpretation system that analyzes user requests using cognitive science principles and extrapolates logical volition. Use when user requests are ambiguous, when deeper understanding would improve response quality, or when helping users clarify what they truly need. Applies probabilistic intent mapping, first principles decomposition, and Socratic clarification to transform vague requests into well-understood goals.
naming-analyzer
Suggest better variable, function, and class names based on context and conventions.
complexity-analyzer
Measure and report code complexity metrics with actionable recommendations.
auth-analyzer
Review and analyze authentication and authorization patterns for security vulnerabilities.
wp-test-analyzer
Analyze WordPress theme PHP files to extract testable elements for E2E test generation.
test-coverage-analyzer
Analyzes test coverage gaps and suggests test cases for untested code paths. Use when user requests test improvements, coverage analysis, or wants to increase test coverage.
security-analyzer
Comprehensive security vulnerability analysis for codebases and infrastructure. Scans dependencies (npm, pip, gem, go, cargo), containers (Docker, Kubernetes), cloud IaC (Terraform, CloudFormation), and detects secrets exposure. Fetches live CVE data from OSV.dev, calculates risk scores, and generates phased remediation plans with TDD validation tests. Use when users mention security scan, vulnerability, CVE, exploit, security audit, penetration test, OWASP, hardening, dependency audit, container security, or want to improve security posture.