agentleFS
tddworkstddworks/asc-cli/.claude/skills/improvement/SKILL.md

improvement

Skill393 starsChanged 37 days agoApache-2.0View on GitHub

Guide for making improvements to existing asc-swift (App Store Connect CLI) functionality using TDD. Use this skill when: (1) Enhancing existing features (not adding new ones) (2) Improving output formatting, performance, or code quality (3) User asks "improve X", "make Y better", or "enhance Z" (4) Small enhancements that don't require full architecture design For NEW features, use implement-feature skill instead.

4 other projects use a version of this, 3 of them edited.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 3

    1. tddworks/ClaudeBar★ 1.6k19% same
    2. tddworks/SkillsManager★ 16546% same
    3. kiminmonaco/ClaudeBar★ 846% same

    Wrote their own version · 1

    1. tikhomirov/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. 4 are common, 2 are distinctive, and 2 are very specific to this project.

  • 4

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    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. Very specific:

    Use formatter.formatAgentItems() (not formatItems) for commands that should include affordances.

    line 101
  2. Distinctive:

    Keep existing tests passing:

    line 156
  3. Common:

    Keep changes focused and minimal

    line 173
  4. Very specific:

    Put the rule on the type that owns it — a state enum's semantic boolean, a model's structuredAffordances, the Infrastructure mapper — not …

    line 174
  5. Common:

    Add tests for new behavior

    line 176
  6. Common:

    Follow existing code patterns

    line 177
  7. Distinctive:

    Write implementation before tests — always Red → Green → Refactor

    line 180
  8. Common:

    Add features (use implement-feature)

    line 184

“Common” is measured: kept by at least 6 in 10 of the 3 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

Improve asc-swift Feature

Make improvements to existing functionality using TDD and rich domain design.

When to Use This vs Other Skills

ScenarioSkill to Use
Enhance existing behaviorimprovement (this skill)
Fix broken behaviorfix-bug
Add new featureimplement-feature

Workflow

┌─────────────────────────────────────────────────────────────┐
│  1. UNDERSTAND CURRENT STATE                                 │
├─────────────────────────────────────────────────────────────┤
│  • Read existing code                                        │
│  • Understand current behavior                               │
│  • Identify what to improve                                  │
└─────────────────────────────────────────────────────────────┘
                            │
                            ▼
┌─────────────────────────────────────────────────────────────┐
│  2. WRITE TEST FOR IMPROVED BEHAVIOR (Red)                   │
├─────────────────────────────────────────────────────────────┤
│  • Test describes the IMPROVED behavior                      │
│  • Test should FAIL initially                                │
│  • Keep existing tests passing                               │
└─────────────────────────────────────────────────────────────┘
                            │
                            ▼
┌─────────────────────────────────────────────────────────────┐
│  3. IMPLEMENT & VERIFY (Green)                               │
├─────────────────────────────────────────────────────────────┤
│  • Implement the improvement                                 │
│  • New test PASSES                                           │
│  • All existing tests still pass                             │
└─────────────────────────────────────────────────────────────┘
                            │
                            ▼
┌─────────────────────────────────────────────────────────────┐
│  4. UPDATE FEATURE DOC (if public surface changed)           │
├─────────────────────────────────────────────────────────────┤
│  • Update docs/features/<feature>/README.md if usage,        │
│    REST, or gotchas changed (flags: just run `make docs`)    │
│  • One CHANGELOG line under [Unreleased]                      │
│  • Derive from code — read files, then write                 │
└─────────────────────────────────────────────────────────────┘

Types of Improvements

1. Domain Model Improvements

Enhance value type behavior:

Examples:
- Add computed property for common queries (Build.isReady, App.shortIdentifier)
- Improve date formatting on Build.ageDescription
- Add convenience accessors on BetaGroup or BetaTester
- Better encapsulation of domain rules in ProcessingState

Test approach: State-based domain tests

@Test func `should show a valid build's processing state as Valid`() {
    let build = Build(id: "1", version: "2.0", processingState: .valid, uploadedDate: .now)
    #expect(build.processingState.displayName == "Valid")
}

2. Output Improvements

Enhance CLI output formatting:

Examples:
- Better table column widths or alignment
- Richer JSON output fields (switch formatItems → formatAgentItems for affordances)
- More useful error messages with suggestions
- Improved markdown formatting for apps/builds
- Add AffordanceProviding to existing model missing it

JSON output shape for agent-first commands: {"data":[{...fields..., "affordances":{...cmds...}}]} Use formatter.formatAgentItems() (not formatItems) for commands that should include affordances.

Test approach: OutputFormatterTests with known domain model inputs; affordance tests in AffordancesTests.swift

3. Infrastructure Improvements

Enhance OpenAPI adapters or error handling:

Examples:
- Better error messages from API failures
- Improved pagination handling
- More robust response field mapping
- Additional fields mapped from SDK types to domain types

Test approach: Adapter tests with mocked APIProvider

4. Command UX Improvements

Enhance CLI command ergonomics:

Examples:
- Better --help text
- Additional --filter or --sort options
- Smarter defaults for --limit
- Improved TUI navigation or display

Test approach: Argument parsing tests or manual TUI verification

TDD Pattern (Chicago School)

ALWAYS write tests first, then implement. Never write implementation code without a failing test. This is non-negotiable.

Think from the user's mental model — test cases describe what the user expects, not internal implementation details. Name each test should <outcome> [when <situation>], never a method, type or mechanism verb (returns, calls, passes, maps) → Naming tests. Rename an older test to this shape when you touch it; don't sweep untouched files.

@Suite
struct {Component}Tests {
    // Name reflects user's expectation, not code internals
    @Test func `should {improved outcome} [when {situation}]`() {
        // Given - standard setup
        let component = Component(...)

        // When - action
        let result = component.improvedMethod()

        // Then - verify improved state/return value
        #expect(result.hasImprovedProperty)
    }
}

Keep existing tests passing:

swift test  # Must remain all green

Architecture Reference

LayerLocationImprovement Examples
DomainSources/Domain/New computed properties, convenience methods, better enums
InfrastructureSources/Infrastructure/Better error mapping, additional field mapping
ASCCommandSources/ASCCommand/Output formatting, command options, TUI enhancements

Guidelines

Do

  • Keep changes focused and minimal
  • Put the rule on the type that owns it — a state enum's semantic boolean, a model's structuredAffordances, the Infrastructure mapper — not in a command or controller
  • Maintain existing behavior
  • Add tests for new behavior
  • Follow existing code patterns

Don't

  • Write implementation before tests — always Red → Green → Refactor
  • Over-engineer simple improvements
  • Change unrelated code
  • Break existing tests
  • Add features (use implement-feature)
  • Skip tests for "small" changes

Checklist

  • Current behavior understood
  • Improvement scope defined (minimal)
  • Test for improved behavior written
  • Test FAILS before implementation
  • Improvement implemented
  • New test PASSES
  • All existing tests still pass (swift test)
  • docs/features/<feature>/README.md updated if usage, REST or gotchas changed; make docs if flags changed; one CHANGELOG line

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.