Privilégier les solutions standard

VérifiéPrudence

Guide l'implémentation technique pour choisir la solution officielle documentée plutôt que du code personnalisé ou généré par IA. À utiliser avant d'écrire du code, d'ajouter une bibliothèque ou de configurer un framework.

Spar Skills Guide Bot
DeveloppementIntermédiaire
09/09/2026
Claude CodeCursorCodex
#standard-library#package-selection#official-docs#framework-configuration#dependency-management

Recommandé pour

Synthèse automatique

Contraint l'agent à chercher d'abord une fonctionnalité native du framework, un paquet maintenu ou un motif officiel avant d'écrire du code personnalisé.

Points forts

  • Lit les manifestes et lockfiles (*.csproj, package.json, go.mod, pyproject.toml…) pour épingler la version exacte du framework et éviter les conseils issus d'une autre version.
  • Donne des exemples concrets de remplacement du code maison par du standard : Polly pour les retries, Serilog.Enrichers.Sensitive pour le masquage, IOptions<T> pour la configuration, les health checks intégrés ASP.NET Core.
  • Réutilise une skill écosystème déjà présente dans la session avant de passer au web, puis privilégie find-docs / ctx7 CLI pour obtenir une documentation versionnée.

Limites

  • Ajoute une phase de recherche systématique (étapes 1 à 3) avant toute ligne de code, ce qui ralentit les tâches triviales.
  • Dépend d'un accès web (WebSearch/WebFetch ou ctx7) : sans réseau ni ces outils, la démarche ne peut pas aboutir.
  • Le critère de « paquet bien maintenu » reste sommaire (mises à jour récentes, nombre de téléchargements, docs claires) et n'évalue ni la licence ni la sécurité des dépendances.
Quand l'utiliser

À utiliser dès qu'une fonctionnalité ressemble à un problème déjà résolu par le framework ou un paquet du registre, comme l'authentification, les retries, la sérialisation, le logging ou les migrations.

Quand l'éviter

À éviter pour de la logique métier réellement inédite ou un script jetable, où aucune solution standard n'existe et où la recherche n'apporte rien.

Analyse de sécurité

Prudence
Score qualité84/100

The skill is advisory and benign in intent: it tells the agent to read manifests, search for existing packages, and follow official docs. No destructive commands, secret exfiltration, obfuscation, or safety-disabling behavior is present. The only real concerns are operational: it instructs executing an unpinned npm package (`npx ctx7@latest`) and carries Bash/Write permissions for a research task, both of which are legitimate but warrant a caution rating rather than a clean 'safe'.

Points d'attention
  • •Instructs running `npx ctx7@latest ...`, which downloads and executes a third-party npm package at latest version on every invocation (supply-chain / unpinned-version risk)
  • •Grants Write and Bash in allowed-tools for what is primarily a research/guidance workflow, so the blast radius is broader than the skill's stated purpose
  • •Directs fetching arbitrary external documentation pages via WebFetch based on WebSearch results, with no allowlist of domains beyond informal guidance
Comment cette analyse est faite

Exemples

Retry logic for HTTP calls
We need retries with backoff on our outbound HTTP calls in this .NET 8 API. Add retry handling.
Mask sensitive data in logs
Our Serilog logs are leaking emails and card numbers — write a custom IDestructuringPolicy to mask those fields.
Scaffold a new Node service
Set up a new Node.js service with config validation and a health check endpoint.

name: standard-first description: > Guides technical implementation to always prefer the standard, officially-documented solution over custom or AI-generated code. Use when you are about to write new code for a feature, suggest or add a library or package, scaffold a new project, or configure a framework, in any language, including .NET and C#, Node.js and npm, Python, Go, Java, and the rest. Use it above all when the problem sounds like something that a built-in framework feature or a package registry already solves, such as logging enrichment, auth, serialization, retries, health checks, or migrations. Do not skip this skill because the answer feels obvious from training data. argument-hint: "[task description]" allowed-tools: [WebSearch, WebFetch, Read, Glob, Write, Bash]

Standard-First

Before you implement anything, find what already exists: a built-in framework feature, a well-maintained package, or an official pattern. Steps 1 to 3 find the candidates, and Step 4 ranks them.

Step 1: Understand the stack

Use Glob and then Read on the dependency and configuration manifests of the project. Those are *.csproj, *.sln, and global.json, plus package.json, go.mod, requirements.txt, pyproject.toml, pom.xml, build.gradle, Cargo.toml, and their lockfiles. Pin the exact framework version and what is already installed. That is what stops you from reading ASP.NET Core 9 docs for a project that targets .NET 6. It also stops you from proposing a package that the project already has under a different name.

When you find no project files, ask the user for the tech stack before you proceed.

Step 2: Check for a technology-specific skill

Before you go to the web, scan the skills available in this session for one that covers the stack from Step 1. An ecosystem skill carries curated and current knowledge for that stack, and it beats a web search. When one matches, invoke it and follow its guidance, and skip Step 3 wherever that skill covers the task. Otherwise continue to Step 3.

Step 3: Search before you implement

For every implementation task, search the official sources before you write any code.

3a. Find out whether a package already solves it

The first question is always this: does the solution already exist? Search the package registry of the stack with WebSearch. Naming the registry in the query is what surfaces its listing, as in serilog log masking nuget or [problem description] npm.

A well-maintained package is almost always better than custom code. Well-maintained means actively updated, with thousands of downloads and clear docs. Such a package gets security patches, bug fixes, and compatibility updates automatically.

Here are examples of packages that replace custom code:

  • To mask sensitive values in Serilog logs, use Serilog.Enrichers.Sensitive, and not a custom IDestructuringPolicy.
  • For retry logic in HTTP calls, use Polly, and not a hand-rolled retry loop.
  • For strongly-typed configuration in ASP.NET Core, use the built-in IOptions<T>, and not manual configuration reads.
  • For health checks, use the built-in Microsoft.AspNetCore.Diagnostics.HealthChecks, and not a custom endpoint.

3b. Fetch and read the official documentation

Once you identify a candidate package or framework feature, fetch its current documentation. Never rely on training data alone, because official docs change and package APIs evolve.

Preferred path, the find-docs skill or the ctx7 CLI: when a find-docs skill is available, invoke it. Otherwise fetch the current docs with the ctx7 CLI. Run npx ctx7@latest library "<name>" to resolve the library, then npx ctx7@latest docs <id> "<focused question matching the task>". Both return curated and versioned docs directly.

Fallback, WebFetch: when neither is available, use WebFetch to retrieve the official documentation page directly.

Take the documentation from the domain of the vendor, and not from a blog or an aggregator. Use learn.microsoft.com for .NET and ASP.NET Core, nodejs.org, docs.python.org, pkg.go.dev, docs.docker.com, and kubernetes.io. For a package, start at its registry listing, and follow the docs site that it links to.

Whatever the source, read the section that is relevant to the task. Also look for sections titled "Best practices", "Recommendations", "Security considerations", "Performance", or "Production". Those sections differ from the getting-started example. They often carry configuration options, ordering constraints, and caveats that the minimal snippet omits and that matter in a real application.

The docs sometimes recommend a specific registration order, configuration pattern, or combination of options for the case at hand. Follow that recommendation, and do not stop at the minimal snippet.

3c. For new project scaffolding

When you create a project from scratch, find and follow the official "Getting Started" guide for the chosen framework. Do not generate boilerplate from memory. Fetch the current guide.

Search for [framework name] getting started official documentation site:[official-domain].

Follow the structure, the naming conventions, and the project layout of the guide exactly as it shows them. The official guide reflects the current recommended approach, and it avoids patterns that something newer has superseded.

Step 4: Choose the simplest solution

After you finish searching, apply Occam's Razor. Prefer the solution with the fewest moving parts that fully solves the stated problem.

Decision hierarchy:

  1. A built-in framework feature, which adds no dependency. Always prefer it when it covers the need.
  2. An official or well-maintained package, which beats custom code when it solves the problem cleanly.
  3. Custom code, only when no package and no built-in feature handles the problem adequately.

Step 5: Implement

Implement from the official docs, and not from training-data patterns. "Simplest" means the fewest invented parts, and it does not mean ignoring official guidance. Following official best practices is simpler over time, because it prevents you from rediscovering the pitfalls that the docs already record.

Every solution must include three things:

  1. The installation command, such as dotnet add package, npm install, or pip install.
  2. Working code that follows the official recommendations. That is the minimal code needed, structured according to the official best-practice pattern rather than copied from the getting-started snippet.
  3. A note on any deviation from a best practice. When the existing code of the project diverges from an official recommendation, call that out instead of matching the deviation in silence.

Keep the implementation concise. Show the minimum that solves the problem correctly, and do not write a comprehensive tutorial.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/prefer-standard-solutions-mttmx6xl/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/prefer-standard-solutions-mttmx6xl' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/prefer-standard-solutions-mttmx6xl/download' --output '.skill-downloads/prefer-standard-solutions-mttmx6xl/SKILL.md.part' && mv '.skill-downloads/prefer-standard-solutions-mttmx6xl/SKILL.md.part' '.skill-downloads/prefer-standard-solutions-mttmx6xl/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/prefer-standard-solutions-mttmx6xl/SKILL.md' && test -s '.skill-downloads/prefer-standard-solutions-mttmx6xl/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/standard-first' && cp -R '.skill-downloads/prefer-standard-solutions-mttmx6xl' '.claude/skills/standard-first'

Cursor
test -f '.skill-downloads/prefer-standard-solutions-mttmx6xl/SKILL.md' && test -s '.skill-downloads/prefer-standard-solutions-mttmx6xl/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/standard-first' && cp -R '.skill-downloads/prefer-standard-solutions-mttmx6xl' '.cursor/skills/standard-first'

Codex
test -f '.skill-downloads/prefer-standard-solutions-mttmx6xl/SKILL.md' && test -s '.skill-downloads/prefer-standard-solutions-mttmx6xl/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/standard-first' && cp -R '.skill-downloads/prefer-standard-solutions-mttmx6xl' '.agents/skills/standard-first'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/prefer-standard-solutions-mttmx6xl'

openskills read 'prefer-standard-solutions-mttmx6xl'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/prefer-standard-solutions-mttmx6xl/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires