xiaohongshu
xiaohongshu
formatter-linter-expert
Universal code formatter and linter analyzer for multi-ecosystem projects (Laravel/PHP, Bun/Node/TS/JS, React, Vue, Astro, Nuxt, Go, Rust, Deno) with intelligent asdf version management, auto-detection, and interactive workflows
Full skill instructions
A comprehensive, intelligent meta-formatter and linter system that automatically detects your project's ecosystem, respects asdf version management, and provides flexible formatting/linting workflows across 9+ development environments.
When to use this skill:
What it does:
.tool-versions| Ecosystem | Formatter | Linter | Config Files |
|---|---|---|---|
| Laravel/PHP | Laravel Pint, PHP-CS-Fixer | PHPStan | pint.json, .php-cs-fixer.php, phpstan.neon |
| Bun/Node/TS/JS | Prettier, Biome | ESLint, Biome | .prettierrc, biome.json, .eslintrc* |
| React/Vue/Astro/Nuxt | Prettier, Biome | ESLint + framework plugins | Framework-specific configs |
| Go | gofmt, goimports | golangci-lint | .golangci.yml |
| Rust | rustfmt | clippy | rustfmt.toml, clippy.toml |
| Deno | deno fmt | deno lint | deno.json, deno.jsonc |
Required:
Optional but Recommended:
.tool-versions file in your project rootEcosystem-specific tools:
composer global require laravel/pint, composer global require friendsofphp/php-cs-fixernpm install -g prettier eslint @biomejs/biome or bun add -g prettier eslint @biomejs/biomego install golang.org/x/tools/cmd/goimports@latest, go install github.com/golangci/golangci-lint/cmd/golangci-lint@latestrustup)Activate the skill naturally:
"Analyze this Laravel project"
"Format all TypeScript files"
"Lint and report on src/ directory"
"Interactive format for Go code"
The skill will automatically:
Search for .tool-versions (asdf integration)
# Reads versions from current dir up to $HOME
php 8.2.0
nodejs 20.10.0
golang 1.21.0
Detect ecosystem via file markers:
composer.json + artisan → Laravelpackage.json + bun.lockb → Bun/*go.mod → GoCargo.toml → Rustdeno.json → DenoFind framework (if JavaScript/TypeScript):
package.json dependencies for react, vue, astro, nuxtLocate configurations:
pint.json, .eslintrc, .prettierrc, etc.Mode A: Analyze Only (default if ambiguous)
Generate comprehensive report WITHOUT modifying files
→ Ideal for CI/CD, code review, initial assessment
Mode B: Format (apply fixes directly)
Auto-fix all formatting issues
→ Fast, non-interactive, writes changes
Mode C: Interactive
Review and approve changes file-by-file
→ Safe, controlled, educational
The skill orchestrates:
# Pseudo-workflow
python scripts/main.py \
--mode analyze \
--scope project \
--asdf-strict \
--output markdown \
--export-json report.json
Behind the scenes:
Analyze mode output:
# Code Quality Report
**Project:** my-laravel-app
**Environment:** Laravel 12 (PHP 8.2.0)
**Date:** 2025-10-30 14:23:45
## Summary
- Files analyzed: 127
- Issues found: 42
- 🔴 Errors: 5
- 🟡 Warnings: 15
- 🔵 Info: 22
## Issues by Category
[Detailed breakdown...]
## Configuration Used
- Formatter: Laravel Pint
- Config: pint.json (detected)
- PHP Version: 8.2.0 (asdf)
## Recommendations
[Actionable next steps...]
Interactive mode prompt:
File: src/Controllers/UserController.php
Issues: 5 formatting, 2 linting
Preview of changes:
[diff display]
Apply fixes to this file? [y/n/s(kip)/q(uit)]: _
If multiple ecosystems detected (e.g., Laravel backend + Vue frontend):
🔍 Detected multiple ecosystems:
1. Laravel/PHP (app/, routes/, database/)
2. Vue.js (resources/js/)
→ Formatting BOTH ecosystems...
[Run PHP formatters on PHP files]
[Run JS formatters on JS/Vue files]
| Error | Cause | Solution |
|---|---|---|
Tool not found: pint | Formatter not installed | Install via composer global require laravel/pint |
asdf version mismatch | .tool-versions version not installed | Run asdf install |
No ecosystem detected | No recognizable file markers | Use --env flag to specify manually |
Config parsing failed | Invalid configuration file | Check config syntax or use --use-defaults |
Permission denied | Cannot write formatted files | Check file permissions or run as appropriate user |
Strict mode (default):
# Uses ONLY asdf versions, fails if not installed
--asdf-strict
Fallback mode:
# Tries asdf, falls back to system PATH if unavailable
--asdf-fallback
Report mode:
# Warns about version mismatch but continues
--asdf-warn
Input:
User: "Analyze and generate quality report for this Laravel API"
Execution:
# Skill detects:
# - Laravel 12 (composer.json + artisan)
# - PHP 8.2.0 from .tool-versions
# - Existing pint.json config
# Runs:
vendor/bin/pint --test --config pint.json
vendor/bin/phpstan analyze --level 5
# Outputs:
# report.md (detailed analysis)
# report.json (structured data)
Expected Output: Markdown report + JSON file showing 127 files analyzed, 42 issues categorized by severity.
Input:
User: "Format all TypeScript files using Biome"
Execution:
# Skill detects:
# - TypeScript project (package.json with typescript dep)
# - Node 20.10.0 from .tool-versions
# - biome.json config present
# Runs:
biome format --write src/
# Outputs:
# Console: "✅ Formatted 45 files"
Input:
User: "Interactive format for Go files in cmd/ directory"
Execution:
# Skill detects:
# - Go project (go.mod)
# - Go 1.21.0 from .tool-versions
# - No config (uses defaults)
# Runs interactively:
# For each .go file:
# - Shows gofmt diff
# - Prompts: Apply? [y/n/s/q]
# - Applies only if 'y'
Interactive Flow:
File: cmd/server/main.go (3 formatting issues)
--- Original
+++ Formatted
@@ -15,7 +15,7 @@
-func main(){
+func main() {
Apply fixes? [y/n/s/q]: y
✅ Applied
File: cmd/worker/worker.go (1 issue)
[...]
Input:
User: "Full project format - both backend and frontend"
Execution:
# Skill detects:
# - Laravel (composer.json)
# - Vue.js (package.json with vue dependency)
# - PHP 8.2.0 + Node 20.10.0 from .tool-versions
# Runs sequentially:
# 1. PHP formatting (Pint on app/, routes/, database/)
# 2. Vue formatting (Prettier on resources/js/)
# Outputs:
# Combined report for both ecosystems
Output:
# Multi-Ecosystem Report
## PHP (Laravel)
- Files: 87
- Fixed: 12 formatting issues
## JavaScript (Vue)
- Files: 40
- Fixed: 8 formatting issues
Total: 127 files processed, 20 issues fixed
User: "Format with custom config at configs/my-pint.json"
Skill will use --config configs/my-pint.json flag.
User: "Lint only the app/Services/ directory"
Skill scopes analysis to that path only.
User: "Generate JSON report for pipeline"
Outputs report.json:
{
"project": "my-app",
"timestamp": "2025-10-30T14:23:45Z",
"environment": {
"ecosystem": "laravel",
"php_version": "8.2.0",
"tools": ["pint", "phpstan"]
},
"summary": {
"files_analyzed": 127,
"issues": {
"errors": 5,
"warnings": 15,
"info": 22
}
},
"issues": [
{
"file": "app/Http/Controllers/UserController.php",
"line": 45,
"severity": "error",
"message": "Indentation incorrect",
"rule": "PSR-12"
}
],
"exit_code": 1
}
.prettierrc, pint.json) to version controlvendor/, node_modules/, dist/Cause: Project lacks recognizable file markers
Fix:
# Manual specification
User: "Format this PHP project using Pint"
# Or create marker file
touch composer.json # for PHP projects
Cause: asdf not installed or not in PATH
Fix:
# Install asdf
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0
# Add to shell
echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc
source ~/.bashrc
# Or use fallback mode
User: "Format with system tools (ignore asdf)"
Cause: .tool-versions specifies version not installed via asdf
Fix:
# Install missing version
asdf plugin add php
asdf install php 8.2.0
# Or use fallback mode to use system PHP
Cause: Malformed configuration file
Fix:
# Validate JSON
cat biome.json | jq .
# Or use default config
User: "Format using default Biome config"
User Request
↓
Environment Detector
├─ asdf Manager (version resolution)
├─ Config Finder (locate configs)
└─ File Analyzer (detect ecosystem)
↓
Orchestrator
├─ PHP Formatter/Linter
├─ JS Formatter/Linter
├─ Go Formatter/Linter
├─ Rust Formatter/Linter
└─ Deno Formatter/Linter
↓
Reporter
├─ Markdown Report
├─ JSON Export
└─ Console Output
Optimization tips:
--scope to limit analysis to specific directories--exclude node_modules,vendor| Code | Meaning |
|---|---|
| 0 | Success - no issues found |
| 1 | Formatting issues found (fixable) |
| 2 | Linting warnings found |
| 3 | Linting errors found (requires manual fix) |
| 10 | Tool not found / not installed |
| 11 | asdf version mismatch |
| 12 | Configuration error |
| 99 | Unknown error |
No related skills detected in current environment
Version History:
Roadmap:
Known Limitations:
Author: Created for personal cross-project use Created: 2025-10-30 License: Personal use
# Analyze only (default)
"Analyze this project"
# Format directly
"Format all files"
# Interactive review
"Interactive format"
# Specific scope
"Lint the src/ directory"
"Format app/Services/PaymentService.php"
# Custom config
"Format using my custom Pint config at config/pint.json"
# Export report
"Generate quality report with JSON export"
# Multi-ecosystem
"Format both PHP and Vue code"
# Ignore asdf
"Format using system tools"
Need Help?
which pint, which prettier, etc.asdf currentcat pint.json, cat .eslintrcvendor/bin/pint --test, prettier --check src/xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience