libragent-quality
Skill11 starsChanged 20 days agoMITView on GitHub
Code quality validation for LibrAgent project. Use when performing code quality checks, refactoring validation, or ensuring code meets project standards for TypeScript/React frontend and Rust backend. Runs comprehensive validation including linting, formatting, type checking, build verification, and dead code detection.
- Installs packages
In this repository48 other files it gives its agents.
- agents.mdAGENTS.md
- .agents/skills/react-best-practices/AGENTS.mdAGENTS.md
- .agents/skills/react-native-skills/AGENTS.mdAGENTS.md
- .agents/skills/react-view-transitions/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- agent-initSkill
- agy-delegateSkill
- audit-docsSkill
- code-audit-expertSkill
- computer-diagnosisSkill
- create-builtin-toolSkill
- create-prSkill
- critique-builtin-toolSkill
- doc-auditorSkill
- docxSkill
- extract-log-debugSkill
- feature-refactor-proposalSkill
- gatekeeper-loopSkill
- harbor-harness-improvement-loopSkill
- i18n-language-standardsSkill
- jobs-trace-analyzerSkill
- lean-builtin-tool-auditorSkill
- libr-delegateSkill
- libr-tool-e2e-harness-loopSkill
- modular-large-file-refactorSkill
- performance-auditSkill
- pptxSkill
- vercel-react-best-practicesSkill
- vercel-react-native-skillsSkill
- vercel-react-view-transitionsSkill
- readme-showcase-syncSkill
- refactor-builtin-toolSkill
- release-managerSkill
- review-local-changesSkill
- review-pr-commentsSkill
- science-searchSkill
- setup-wizardSkill
- skill-creatorSkill
- soul-awakeningSkill
- sqlite-analyzerSkill
- sync-pending-approvalsSkill
- tool-creatorSkill
- trace-analyzerSkill
- trace-eval-loopSkill
- vitepress-doc-syncSkill
- worker-loopSkill
- x-cliSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 9 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Before every install, scripts/enforce-pnpm-version.cjs rejects other pnpm versions (for example pnpm 11 regenerating the lockfile without …
- Distinctive: line 100
Vitest: - Test suite execution
- Distinctive: line 117
Wait for all checks to pass.
- Very specific: line 145
Never use
any: - Use precise types, unknown with type guards, or generics - Distinctive: line 148
No inline import types: - Use proper import statements at top of file
- Very specific: line 152
Use
rustfmt: - Always format before committing - Very specific: line 153
Fix clippy warnings: - No warnings allowed (-D warnings in CI)
- Very specific: line 154
Handle errors explicitly: - Use Result<T, E> types
- Very specific: line 155
Document public APIs: - Use /// doc comments
- Very specific: line 161
Compound components: - Use patterns like Chat.Header, Chat.Messages
- Very specific: line 168
Check .eslintrc.js or eslint.config.js for rules.
- Very specific: line 172
Run pnpm format to auto-fix formatting issues.
- Distinctive: line 176
Read clippy suggestions carefully - they often indicate actual bugs or improvements.
- Very specific: line 180
Check TypeScript errors: tsc --noEmit
- Very specific: line 181
Check Rust errors: cd src-tauri && cargo check
- Distinctive: line 196
All tests must pass
- Distinctive: line 197
No dead code (with approved exceptions)
- Distinctive: line 201
Run validation early and often: - Don't wait until PR time
- Distinctive: line 204
Keep tests passing: - Don't commit broken tests
- Distinctive: line 205
Document exceptions: - If you must disable a rule, explain why
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
LibrAgent Code Quality Validation
This skill provides comprehensive code quality validation for the LibrAgent project, which uses a dual-stack architecture with React/TypeScript frontend and Rust/Tauri backend.
Quick Start
For complete validation before commits or PRs:
pnpm refactor:validateThis runs all checks in sequence and ensures code quality across the entire stack.
It also runs pnpm lockfile:check (pnpm install --frozen-lockfile) to match CI dependency installation.
Package Manager Pin
package.jsondeclares"packageManager": "pnpm@9.15.9"and"engines.pnpm": "9.15.9".- Before every install,
scripts/enforce-pnpm-version.cjsrejects other pnpm versions (for example pnpm 11 regenerating the lockfile withoutoverrides). - Local setup:
corepack enable
corepack prepare pnpm@9.15.9 --activate
pnpm install --frozen-lockfileIndividual Validation Commands
Frontend (TypeScript/React)
# Linting - Check code style and potential errors
pnpm lint
# Format checking
pnpm format:check
# Lockfile / CI parity check
pnpm lockfile:check
# Auto-fix formatting issues
pnpm format
# Type checking and build
pnpm build
# Dead code detection
pnpm dead-code
# Run tests
pnpm test:runBackend (Rust)
# Format checking
pnpm rust:fmt:check
# Auto-format Rust code
pnpm rust:fmt
# Lint with clippy
pnpm rust:clippy
# Type checking
pnpm rust:check
# Check with all features
pnpm rust:check:all
# Run tests — full suite is sequential (OOM-safe); prefer --test while iterating
pnpm rust:test
pnpm rust:test --test text_encoding_tests
# Modules under tests/integration/ live in the integration_tests binary:
pnpm rust:test --test integration_tests -- workspace_skill_access_regression_tests
# Run tests (edit-file-only build; anchor/editFile regression)
pnpm rust:test:edit-file
# Complete Rust validation
pnpm rust:validateComplete Validation Pipeline
The refactor:validate command executes:
- ESLint - JavaScript/TypeScript code quality
- Prettier - Code formatting consistency
- Lockfile check -
pnpm install --frozen-lockfile(CI parity) - Vitest - Test suite execution
- Rust fmt - Rust code formatting
- Rust clippy - Rust linting
- Rust check - Rust compilation check with all features
- Rust test - Rust test suite (default
workspace-str-replacebuild) - Rust test (edit-file) - Rust test suite with
--no-default-features --features workspace-edit-file - Vite build - Production build verification
- Unimported - Unused code detection
Common Validation Scenarios
Before Committing
pnpm refactor:validateWait for all checks to pass. Fix any errors reported.
Quick Frontend Check
pnpm lint && pnpm format && pnpm buildQuick Backend Check
pnpm rust:validateFix Formatting Issues
# Fix frontend formatting
pnpm format
# Fix Rust formatting
pnpm rust:fmtCritical Project Rules
TypeScript Rules
- Never use
any- Use precise types,unknownwith type guards, or generics - No ESLint-disable comments - Fix the underlying issue instead
- Use centralized logger -
getLogger('ComponentName')notconsole.* - No inline import types - Use proper import statements at top of file
Rust Rules
- Use
rustfmt- Always format before committing - Fix clippy warnings - No warnings allowed (
-D warningsin CI) - Handle errors explicitly - Use
Result<T, E>types - Document public APIs - Use
///doc comments
Architecture Rules
- Feature-based organization - Components in
src/features/ - Service layer pattern - Business logic in
src/lib/ - Compound components - Use patterns like
Chat.Header,Chat.Messages - Type safety - Define interfaces in
src/models/
Troubleshooting
ESLint Errors
Check .eslintrc.js or eslint.config.js for rules. Fix code to match standards.
Prettier Conflicts
Run pnpm format to auto-fix formatting issues.
Rust Clippy Warnings
Read clippy suggestions carefully - they often indicate actual bugs or improvements.
Build Failures
- Check TypeScript errors:
tsc --noEmit - Check Rust errors:
cd src-tauri && cargo check - Verify dependencies:
pnpm install
Dead Code Detection
Review unimported output. Remove unused exports or add to ignore list if intentional.
Integration with CI/CD
The project uses GitHub Actions for CI. All validation commands must pass before merge:
- ESLint must pass
- Prettier formatting must be correct
- TypeScript must compile without errors
- Rust must compile without warnings
- All tests must pass
- No dead code (with approved exceptions)
Best Practices
- Run validation early and often - Don't wait until PR time
- Fix issues incrementally - Easier to debug when changes are small
- Read error messages carefully - They often contain the solution
- Keep tests passing - Don't commit broken tests
- Document exceptions - If you must disable a rule, explain why
Reference
For detailed project guidelines, see:
.github/copilot-instructions.md- Complete coding standardsagents.md- Agent-specific guidelinesdocs/architecture/- Architecture documentationCONTRIBUTING.md- Contribution guidelines
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

