parse-package-json
БесплатноБез исполняемых скриптовНе проверенExtract version, dependencies, and metadata from package.json files. Use when needing project version, dependency list, or package metadata for releases…
Об этом скилле
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
nameandversionfields at minimum - Dependencies should be objects (if present)
Step 3: Extract Fields
Extract relevant fields into structured output.
Fields to Extract:
version: Semantic version stringname: Package namedescription: 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:
{
"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:
{
"version": "0.7.0",
"name": "megacampus2"
}
Example 2: Full Package Info
Input:
file_path: ./packages/client/package.json
Output:
{
"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:
{
"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 structure
Установить parse-package-json в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadВложенные файлы
FAQ
Что делает скилл 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.
Как установить скилл parse-package-json?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл parse-package-json запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
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…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic