Agent skill

Best Practices

by lightly-ai in lightly-ai/lightly-studio

Read when adding a new function, module, or component, or when a file is growing large enough that splitting it is worth considering.

Apache-2.0Auto-check passed

Install Best Practices

skills CLI
$ npx skills add lightly-ai/lightly-studio --skill best-practices -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lightly-ai/lightly-studio best-practices --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lightly-ai/lightly-studio.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/best-practices .claude/skills/best-practices && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
best-practices
GitHub stars
896
Token cost
~424 tokens
SKILL.md length
193 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
Apache-2.0

At a glance

Read when adding a new function, module, or component, or when a file is growing large enough that splitting it is worth considering.

  • SKILL.md covers Design Principles and Managing Complexity
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Best Practices is an agent skill from lightly-ai/lightly-studio. Read when adding a new function, module, or component, or when a file is growing large enough that splitting it is worth considering. Covers SOLID design principles, minimal interfaces, composition over inheritance, and the size and complexity limits for functions, files, and nesting depth.

Its SKILL.md is about 420 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: LightlyStudio - The Unified Data Platform for Multimodal ML. The licence is Apache-2.0.

Example prompts

  • “/best-practices”

What it can do on your machine

Read from SKILL.md and the folder at commit d4257ff. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Best Practices loads about 424 tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 193 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~424

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from lightly-ai/lightly-studio at commit d4257ff, republished under its Apache-2.0 licence (© lightly-ai). 193 words, ~424 tokens.

Download SKILL.mdSave it as .claude/skills/best-practices/SKILL.md (or your agent's skills folder).
name
best-practices
description
Read when adding a new function, module, or component, or when a file is growing large enough that splitting it is worth considering. Covers SOLID design principles, minimal interfaces, composition over inheritance, and the size and complexity limits for functions, files, and nesting depth.

Best Practices

Design Principles

Apply SOLID principles to create maintainable, scalable components.

Single Responsibility

A function or module should have one reason to change. If it has two, split it. Do not mix data fetching, business logic and presentation in the same component. Small files are welcome.

Minimal Interfaces

Components should only accept the data that they actually use. Avoid passing entire objects when a few fields suffice. Create an abstracted interface that only exposes what the component needs.

Composition over Inheritance

Don't create deep class hierarchies. Build complex behavior by combining small, focused units. Use dependency injection and dependency inversion.

Managing Complexity

Split Large Units

When adding new code, always consider splitting the logic into a new function, component or a file. As a rule of thumb:

  • Functions should be under 20 lines
  • Files should be under 400 lines
Reducing Complexity

Keep logic easy to understand by reducing horizontal, vertical and cyclomatic complexity. As a rule of thumb:

  • Nesting depth should be under 3 levels - use early returns to flatten
  • Conditional branches per function should be limited - extract complex logic into separate functions
  • Extract helper variables instead of writing complex inline expressions

© lightly-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/best-practices of lightly-ai/lightly-studio.

Open the folder on GitHubat commit d4257ff

Compare with similar skills

Best Practices next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Best Practices compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Best Practices this skilllightly-ai/lightly-studio896—~424Automated safety check: PassApache-2.0
Es Modulesthedaviddias/Front-End-Checklist74k—~482Automated safety check: PassMIT
Azure Functionsdavila7/claude-code-templates32k2 repos~344Automated safety check: PassMIT
Neon Functionssickn33/agentic-awesome-skills47k1 repos~8.6kAutomated safety check: NotesApache-2.0
GCP Cloud Functionssickn33/agentic-awesome-skills47k2 repos~2.3kAutomated safety check: PassMIT
Splitting Oversized ModulesPostHog/posthog40k—~2.2kAutomated safety check: PassCustom licence

Similar skills

  • Es Modules

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing scripts, client components, bundles, or runtime behavior related to Use ES modules (import/export).

    74k GitHub stars~482 tokensUpdated 3 days ago
    Auto-check passed
  • Azure Functions

    davila7/claude-code-templates

    Expert patterns for Azure Functions development including isolated worker model, Durable Functions orchestration, cold start optimization, and production patterns.

    32k GitHub starsUsed in 2 repos~344 tokens
    Backend & APIsAuto-check passed
  • Neon Functions

    sickn33/agentic-awesome-skills

    Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASEURL injected automatically and compute that runs next to your data.

    47k GitHub starsUsed in 1 repo~8.6k tokens
    Backend & APIsAuto-check: notes
  • GCP Cloud Functions

    sickn33/agentic-awesome-skills

    Deploy serverless functions on Google Cloud Functions. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~2.3k tokens
    Backend & APIsAuto-check passed
  • Official

    Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior.

    40k GitHub stars~2.2k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Abp Module

    abpframework/abp

    ABP reusable Module solution template - EF Core + MongoDB dual support, virtual methods for extensibility, DbTablePrefix, module options pattern, entity extension, separate connection string.

    14k GitHub stars~1.6k tokensUpdated today
    DatabasesAuto-check passed

More from lightly-ai/lightly-studio

  • Backend Guide

    lightly-ai/lightly-studio

    Read before adding or changing backend code in lightlystudio - FastAPI routes, services, resolvers, SQLModel tables, or database access.

    896 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Frontend Guide

    lightly-ai/lightly-studio

    Read before writing or reviewing any frontend code in lightlystudioview - Svelte, TypeScript, or SvelteKit files.

    896 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Python Guide

    lightly-ai/lightly-studio

    Read before writing or reviewing any Python code in this repository.

    896 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Glossary

    lightly-ai/lightly-studio

    Read when naming anything user-facing - GUI text, docs, public Python API names, arguments, docstrings, or error messages.

    896 GitHub stars~482 tokensUpdated today
    Auto-check passed
  • Pull Requests

    lightly-ai/lightly-studio

    Read when opening a pull request, writing a PR description, splitting work into PRs, or deciding whether a change is too large to review.

    896 GitHub stars~709 tokensUpdated today
    Auto-check passed

Questions about Best Practices

What does Best Practices do?

Read when adding a new function, module, or component, or when a file is growing large enough that splitting it is worth considering. Best Practices is an agent skill from lightly-ai/lightly-studio. Read when adding a new function, module, or component, or when a file is growing large enough that splitting it is worth considering.

How do I install Best Practices in Claude Code?

Run `npx skills add lightly-ai/lightly-studio --skill best-practices -a claude-code`. Or copy the skill folder (.agents/skills/best-practices in lightly-ai/lightly-studio) into .claude/skills/best-practices in your project. Claude Code loads it when a task matches its description.

How do I install Best Practices in Codex?

Run `npx skills add lightly-ai/lightly-studio --skill best-practices -a codex`. Or copy the skill folder (.agents/skills/best-practices in lightly-ai/lightly-studio) into .agents/skills/best-practices in your project. Codex loads it when a task matches its description.

Can I use Best Practices in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lightly-ai/lightly-studio --skill best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/best-practices, .gemini/skills/best-practices, .github/skills/best-practices and .opencode/skills/best-practices in your project.

What does Best Practices need to run?

SKILL.md names no scripts, command-line tools or credentials: Best Practices is instructions for the agent only.

Does Best Practices access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Best Practices safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Best Practices use?

Best Practices is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Best Practices use?

About 424 tokens (SKILL.md is roughly 1.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Best Practices?

Skills that share tags, products or a category with Best Practices: Es Modules (thedaviddias/Front-End-Checklist, 74k stars), Azure Functions (davila7/claude-code-templates, 32k stars), Neon Functions (sickn33/agentic-awesome-skills, 47k stars) and GCP Cloud Functions (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Best Practices?

lightly-ai (a GitHub organization) maintains it in lightly-ai/lightly-studio, which has 896 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 9, 2026.

Source: lightly-ai/lightly-studio on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.