Nettoyeur de code et optimisation

VérifiéPrudence

Effectue une maintenance approfondie du dépôt en analysant le code source, détectant les fonctions inutilisées et optimisant les déploiements GCP. Utilisez cette compétence pour nettoyer le projet, supprimer le code redondant ou réduire l'empreinte cloud.

Spar Skills Guide Bot
DeveloppementIntermédiaire
4002/06/2026
Claude Code
#code-cleanup#static-analysis#project-maintenance#gcp-optimization

Recommandé pour

Notre avis

Effectue une maintenance approfondie du dépôt OlyBars en analysant le code pour les fonctions inutilisées et en optimisant les configurations GCP.

Points forts

  • Identifie le code mort via une analyse statique
  • Optimise les configurations Cloud Run sur GCP
  • Produit un rapport d'hygiène clair et actionnable
  • Réduit la taille et la complexité du projet

Limites

  • Fonctionne uniquement avec le dépôt OlyBars
  • Nécessite l'exécution d'un script spécifique
  • Peut manquer des fonctions référencées dynamiquement
Quand l'utiliser

Utilisez cette compétence lorsque l'utilisateur demande d'optimiser ou de nettoyer le projet OlyBars.

Quand l'éviter

Ne l'utilisez pas si le projet n'est pas OlyBars ou si vous avez besoin d'améliorations de qualité de code plus générales.

Analyse de sécurité

Prudence
Score qualité72/100

The skill uses a shell command to execute a repository script, which falls under powerful tooling. While the intent is legitimate maintenance, the script’s behavior is unverified, so caution is warranted.

Points d'attention
  • The skill instructs running a locally-provided TypeScript script via npx, which could perform arbitrary file system operations or network requests. Although the script is intended for static analysis and cleanup, without auditing its contents, there is inherent risk in execution.

Exemples

Optimize project
Optimize the OlyBars project and clean up any redundant code.
Clean up site
Clean up the site and find any unused functions in the codebase.
Run janitor
Run the janitor script to perform a hygiene check on the repository.

name: janitor description: Performs deep maintenance on the OlyBars repo. Use this when the user asks to "optimize the project," "clean up the site," or "find redundant code."

Janitor Skill

Goals

  • Maintain a lean, high-performance us-west1 GCP footprint.
  • Ensure the repository remains readable for other agents in the swarm.

Instructions

  1. Introspection: Read ARCHITECTURE.md and the package.json to understand the intended stack.
  2. Analysis: Traverse the src/ directory. Use static analysis to find functions with no internal references.
  3. GCP Guardrails: Verify Cloud Run configurations in server/ aren't bundling unnecessary folders (e.g., tests/ or docs/) into the production container.
  4. Propose: Create a "Hygiene Report" artifact with a checklist of suggested deletions.

Execution

Use the custom script scripts/janitor.ts to perform the heavy lifting of static analysis.

npx tsx scripts/janitor.ts
Skills similaires