parse-package-json
Extract version, dependencies, and metadata from package.json files. Use when needing project version, dependency list, or package metadata for releases, audits, or reports.
Best use case
parse-package-json is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Extract version, dependencies, and metadata from package.json files. Use when needing project version, dependency list, or package metadata for releases, audits, or reports.
Teams using parse-package-json 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/parse-package-json/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How parse-package-json Compares
| Feature / Agent | parse-package-json | 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?
Extract version, dependencies, and metadata from package.json files. Use when needing project version, dependency list, or package metadata for releases, audits, or reports.
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
# Parse Package JSON
Extract structured data from package.json files for version management, dependency auditing, and metadata retrieval.
## When to Use
- Get current project version for release workflows
- Extract dependency list for auditing
- Read package metadata for reports
- Validate package.json structure
## Instructions
### Step 1: Read package.json
Use Read tool to load package.json file.
**Expected Input**:
- `file_path`: Path to package.json (default: `./package.json`)
**Tools Used**: Read
### Step 2: Parse JSON
Parse the JSON content and validate structure.
**Validation**:
- File must be valid JSON
- Must contain `name` and `version` fields at minimum
- Dependencies should be objects (if present)
### Step 3: Extract Fields
Extract relevant fields into structured output.
**Fields to Extract**:
- `version`: Semantic version string
- `name`: Package name
- `description`: Package description (optional)
- `dependencies`: Production dependencies object (optional)
- `devDependencies`: Development dependencies object (optional)
- `scripts`: Available npm scripts (optional)
- `main`: Entry point file (optional)
- `private`: Private flag (optional)
### Step 4: Return Structured Data
Return extracted data as JSON object.
**Expected Output**:
```json
{
"version": "0.7.0",
"name": "megacampus2",
"description": "Project description",
"dependencies": {
"react": "^18.2.0"
},
"devDependencies": {
"typescript": "^5.0.0"
},
"scripts": {
"build": "tsc",
"test": "jest"
},
"main": "dist/index.js",
"private": true
}
```
## Error Handling
- **File Not Found**: Return error with message "package.json not found at {path}"
- **Invalid JSON**: Return error with parsing details
- **Missing Required Fields**: Return error listing missing fields (name, version)
- **Invalid Structure**: Return error describing structure issue
## Examples
### Example 1: Extract Version
**Input**:
```
file_path: ./package.json
```
**Output**:
```json
{
"version": "0.7.0",
"name": "megacampus2"
}
```
### Example 2: Full Package Info
**Input**:
```
file_path: ./packages/client/package.json
```
**Output**:
```json
{
"version": "1.2.3",
"name": "@megacampus/client",
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"scripts": {
"dev": "vite",
"build": "vite build"
}
}
```
### Example 3: Error - File Not Found
**Input**:
```
file_path: ./nonexistent.json
```
**Output**:
```json
{
"error": "package.json not found at ./nonexistent.json",
"success": false
}
```
## Validation
- [ ] Can read package.json from default path
- [ ] Can read package.json from custom path
- [ ] Extracts all specified fields correctly
- [ ] Handles missing optional fields gracefully
- [ ] Returns error for missing file
- [ ] Returns error for invalid JSON
- [ ] Returns error for missing required fields
## Supporting Files
- `schema.json`: JSON schema defining expected package.json structureRelated Skills
parse-git-status
Parse git status output into structured data showing staged, modified, and untracked files. Use for pre-flight validation, checking clean working directory, or listing changed files before commits.
parse-error-logs
Parse build errors, test failures, type-check output, and validation logs into structured data. Use when processing npm/pnpm output, TypeScript errors, Jest failures, or any validation command results for quality gates.
Beads Issue Tracking Skill
> **Attribution**: [Beads](https://github.com/steveyegge/beads) by [Steve Yegge](https://github.com/steveyegge)
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
validate-report-file
Validate that worker-generated reports have all required sections and proper formatting. Use in quality gates, for report completeness checking, or when debugging missing report sections.
validate-plan-file
Validate that orchestrator plan files conform to expected JSON schema. Use before workers read plan files or after orchestrators create them to ensure proper structure and required fields.
ux-researcher-designer
UX research and design toolkit for Senior UX Designer/Researcher including data-driven persona generation, journey mapping, usability testing frameworks, and research synthesis. Use for user research, persona creation, journey mapping, and design validation.
ui-design-system
UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
setup-knip
Install and configure Knip for dead code detection. Use before running dead-code-hunter or dependency-auditor to ensure Knip is available. Handles installation, configuration creation, and validation.
senior-prompt-engineer
World-class prompt engineering skill for LLM optimization, prompt patterns, structured outputs, and AI product development. Expertise in Claude, GPT-4, prompt design patterns, few-shot learning, chain-of-thought, and AI evaluation. Includes RAG optimization, agent design, and LLM system architecture. Use when building AI products, optimizing LLM performance, designing agentic systems, or implementing advanced prompting techniques.