agentleFS
atelier-fashionatelier-fashion/adlc-toolkit/optimize/SKILL.md

optimize

Skill173 starsChanged 12 days agoMITView on GitHub

API cost & performance scanner — identify expensive operations and optimization opportunities

76 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use arrange, teach-impeccable and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • HK-hubSkill

    arrange

    Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.

    Also in 14 projects that use this

  • HK-hubSkill

    teach-impeccable

    One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.

    Also in 17 projects that use this

  • zwy123zwySkill

    normalize

    将用户随意输入的提示词规范化为结构清晰、便于大模型执行的标准化提示词。适用于需要整理、统一提示词格式时调用。

    Also in 19 projects that use this

  • open-coder-aiSkill

    policy-init

    Create conformant Chock policy from request. args(request, target_path,

    Also in 3 projects that use this

  • +8 more from HK-hub

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 73 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run this block first, with your shell tool, and read its output before you continue.

    line 17
  2. Very specific:

    Before proceeding, verify that .adlc/context/architecture.md and .adlc/context/project-overview.md exist.

    line 33
  3. Distinctive:

    If given a focus area, prioritize that dimension

    line 38
  4. Distinctive:

    If no argument, scan all dimensions

    line 39
  5. Very specific:

    Read .adlc/context/architecture.md for current caching and optimization patterns

    line 40

“Common” is measured: kept by at least 6 in 10 of the 73 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/optimize — API Cost & Performance Scanner

You are scanning this project's API and infrastructure for cost and performance optimization opportunities.

Ethos

!test -s .adlc/ETHOS.md && cat .adlc/ETHOS.md || echo No ethos found — run /init, or /adlc:init on the plugin install, to vendor .adlc/ETHOS.md

Context

Run this block first, with your shell tool, and read its output before you continue. Each read prints a notice instead of failing when its file is absent.

# adlc-context
echo '--- Architecture'
cat .adlc/context/architecture.md 2>/dev/null || echo 'No architecture context found'
echo '--- Project overview'
cat .adlc/context/project-overview.md 2>/dev/null || echo 'No project overview found'

Input

The focus is the argument: whatever follows /optimize in the invocation (on Claude Code it can also arrive as an ARGUMENTS: line appended to this text), a dimension or an area. With none, Step 1 scans all dimensions.

Prerequisites

Before proceeding, verify that .adlc/context/architecture.md and .adlc/context/project-overview.md exist. If any of these files are missing, stop and tell the user: "The .adlc/ structure hasn't been initialized. Run /init (/adlc:init on the plugin install) first to set up the project context."

Instructions

Step 1: Determine Focus

  1. If given a focus area, prioritize that dimension
  2. If no argument, scan all dimensions
  3. Read .adlc/context/architecture.md for current caching and optimization patterns

Step 2: Launch Scanner Agents

Launch 3 formal scanner agents in parallel using the Agent tool. Each agent is defined in $ADLC_TOOLKIT_ROOT/agents/ with its full scanning checklist and model selection (sonnet for deep analysis).

If this harness can run subagents, dispatch these agents in parallel; if it cannot, or you are a subagent, run each checklist inline from .adlc/agents/<name>.md. Agent names are bare on the symlink install and adlc:-prefixed on the plugin install (adlc:<name>): before dispatching, check which form the Agent tool lists and use that one, and do not wait for an error, because a name it does not list can silently run a generic agent without the checklist; if neither form is listed, say which agent is missing and run its checklist inline. When .adlc/agents/ is absent, say that /init (/adlc:init on the plugin install) vendors it, then read $ADLC_TOOLKIT_ROOT/agents/<name>.md (the toolkit root is the parent of this skill's base directory) where your file tool can reach it; never improvise a checklist. An inline run of a review or audit agent is read-only: report findings, apply no fixes, and run no test runner, build tool, package manager or interpreter.

  1. api-cost-scanner agent — provide the focus scope and architecture.md for caching context
  2. db-perf-scanner agent — provide the focus scope
  3. latency-scanner agent — provide the focus scope

Each agent returns structured findings with estimated impact, effort, and risk.

Step 3: Build Optimization Report

Cost Summary

ServiceEst. Monthly UsageEst. Monthly CostTop Optimization
Claude SonnetX calls$X...
Claude HaikuX calls$X...
Gemini FlashX calls$X...
SerpAPIX calls$X...
FirestoreX reads/writes$X...
GCSX operations$X...

Performance Hotspots

Rank endpoints by estimated latency, highlighting:

  • Sequential operations that could be parallel
  • Missing caches
  • N+1 query patterns
  • Unnecessary data fetching

Optimization Opportunities

For each opportunity:

  • What: Description of the optimization
  • Impact: Cost savings or latency reduction estimate
  • Effort: Small / Medium / Large
  • Risk: Low / Medium / High (chance of breaking something)

Step 4: Prioritized Recommendations

  1. Rank optimizations by impact/effort ratio
  2. Group into quick wins (small effort, high impact) and strategic improvements
  3. Suggest which items warrant a full ADLC requirement (candidates for /spec)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.