본문으로 건너뛰기
cccskills
무료GitHub에 공개

add-sdk-endpoint

Wrap a new backend endpoint in the TypeScript SDK (packages/sdk), or record it as skipped. Use when `just coverage` fails, or after adding an endpoint to a Rust service.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Add an SDK endpoint

Arg skip: record the endpoint as skipped instead of wrapping it. Run everything from packages/sdk.

Every generated endpoint must either have a call site under src/ or be listed in src/coverage/skipped.ts. Being in both also fails.

0. Find it

Not in generated/ yet? bun run sync-specs && bun run generate (or ask the user to run just update-generated if the Rust spec changed locally — it rebuilds apps/web).

just coverage lists UNCOVERED <service>.<endpoint>.

1. Skip or wrap?

With the skip arg, skip. Otherwise ask the user, one line per endpoint, with a short recommendation — don't decide silently.

Skip-worthy: internal plumbing (auth/session, health, infra, web-app internals, MCP, batch previews) and features so narrow that no SDK user would reach for them. Everything a user could plausibly want belongs in the SDK.

To skip: add the method name, alphabetically, to <camelService>Excluded in src/coverage/skipped.ts, then just coverage && just check. Don't wrap.

To wrap it

  1. Read the method in generated/<service>/sdk.gen.ts and its types in types.gen.ts (note path / query / body).
  2. Pick a home, and read a sibling first — entities/tasks/ is the smallest complete example, entities/documents/document.ts the richest:
    • acts on one entity → method on that class
    • create/list/search/lookup → the namespace
    • new noun → new src/entities/<noun>/ pair, registered in src/macro.ts
    • cross-entity capability → a base in src/entities/entity.ts
  3. Never take or return a raw id (the SDK rule). Take the entity handle and return handles; if the noun has no entity class yet, build it in this change rather than accepting a string.
  4. Match the conventions:
    • static byId(client, id); detail via Lazy + protected fetch(), exposed with this.field(...) / this.mappedField(...)
    • extend MacroEntity / FavoritableEntity / PropertiedEntity, setting entityType / propertyEntityType
    • writes touching this entity's detail → this.mutate(...); others → unwrap(...)
    • every generated call goes through unwrap()
    • cursor lists → paginate() → AsyncGenerator; search → entitySearch(...)
    • camelCase + undefined on the SDK side even when the wire is snake_case/nullable
    • TSDoc every public member. No any.
  5. New service? Only when the endpoint's service isn't reachable from MacroClient yet — per service, not per entity; a new entity needs none of this. Wire the Sdk into src/utils/client.ts, a host into src/config.ts, and an entry into ACCESSORS in src/coverage/check.ts. That last one is easy to miss: coverage decides "is this called?" by grepping src/ for the literal text .<accessor>.<endpoint>(, so a service absent from ACCESSORS reports every one of its endpoints as UNCOVERED no matter how well you wrapped them. If a whole service looks uncovered, check that map before believing it.
  6. Already listed as skipped? Remove it, or coverage fails with STALE SKIP.
  7. Verify: just check && just coverage && bun run lint && bun run format.
  8. Document: README only for genuinely new user-facing capability. New webhook events come from the storage spec via src/events/types.ts — regenerate, never hand-write.

Never

  • Hand-edit generated/ or specs/ — build output.
  • Accept an id where an entity handle belongs.
  • Mark something skipped just to make coverage pass.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

add-tour

무료

Add or change an in-app feature tour (a view's guided flyover) in the web app. Use when adding a tour to a view, adding or editing tour steps, pointing a step at a new control, or when a step's target needs something opened first.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

macro-inc/macro4.8천2026년 10월 19일 업데이트

audit

무료

Post-change checks before handing off. Works out which checks apply from the files changed (directory AGENTS.md Checks sections and matching .agents/rules), runs or verifies each, and reports pass/fail/skipped. Use before saying work is done, before pushing, or when asked to audit or verify a change.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

macro-inc/macro4.8천2026년 10월 19일 업데이트

Enforce hexagonal architecture in the Rust backend. Use before modifying crates/ or Rust services, especially inbound axum/tool/listener adapters, domain services/ports, outbound adapters, authorization, permissions, database access, or external clients.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

macro-inc/macro4.8천2026년 10월 19일 업데이트

Use when adding collaborative markdown, notes, or descriptions to a feature with collab surfaces. Covers parent entities, service entry points, authorization, content storage, and lifecycle.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

macro-inc/macro4.8천2026년 10월 19일 업데이트

Build a new AI tool end-to-end — Rust implementation, toolset wiring, infra, schema generation, and frontend UI.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

macro-inc/macro4.8천2026년 10월 19일 업데이트

Use when building a feature on reusable database storage or UI, such as CRM, or deciding whether it needs a Macro database entity. Covers shared storage, a host-independent database UI and API contract, ownership, authorization, and the _entities naming convention.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

macro-inc/macro4.8천2026년 10월 19일 업데이트

macro-inc의 스킬 모두 보기

이 스킬의 문제 신고