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

discover

Pull a repo into HQ and turn parallel exploration into company knowledge and policies. Triggers: "discover this repo", "ingest <repo>".

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

indigoai-us/hq-core스타 90(GitHub 90 + cccskills 0)
연동 도구Vercel

실행 점수 미검증

설치 방법 보기

포함된 파일(2)

  • SKILL.md8.3 KB
  • agents/openai.yaml111 B

SKILL.md(원문)

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

Discover

Front door for "I want HQ to know this repo." Acquires the repo at latest main, fans out parallel exploration, writes structured knowledge under the owning company (or standalone), and proposes scoped policies for crystal-clear conventions only. Phased ceremony with explicit gates — inspired by gstack.

Input

$ARGUMENTS may be:

  • https://github.com/<org>/<name> or git@github.com:<org>/<name>.git
  • <org>/<name> shorthand
  • An absolute local path to an existing checkout

Optional flags: --company <slug>, --private, --no-policies.

Phase 1 — Acquire (idempotent)

Input shapeAction
Full git URLUse as-is
<org>/<name> shorthandExpand to https://github.com/<org>/<name>
Absolute local pathSkip clone; verify .git/ exists
  1. Detect visibility + default branch:
    gh repo view <org>/<name> --json visibility,defaultBranchRef,owner,description,primaryLanguage
    
    Skip if already a local path.
  2. Pick target: repos/public/<name> (PUBLIC) or repos/private/<name> (PRIVATE). --private forces private placement.
  3. Clone (if absent):
    git clone --depth=50 --no-single-branch <url> repos/{pub|priv}/<name>
    
    Shallow is sufficient for discovery.
  4. Sync (if present):
    • git -C <path> status --porcelain — bail loudly if dirty (NEVER reset --hard)
    • git -C <path> fetch origin
    • git -C <path> checkout <default_branch>
    • git -C <path> pull --ff-only
  5. Capture head_sha, last_commit (ISO), file count, line count.

Phase 2 — Register (auto-detect company; never ask if any tier resolves)

Resolve owning company in priority order:

TierSourceWin condition
1--company <slug> flagAlways wins if present
2Active session: bash core/scripts/handoff-pointer-company.sh (reads workspace/threads/handoff.json .company, accepting a string, a one-element array, or the linked thread's metadata.company for older pointers), or $HQ_ACTIVE_COMPANYUse if non-empty and present in companies/manifest.yaml
3GitHub org match: owner login → companies/{co}.github_org in manifestSingle match auto-uses; multiple → AskUserQuestion
4Path heuristic: target lives under companies/<co>/repos/...Infer that company
5StandaloneKnowledge writes to core/knowledge/public/repos/<name>/; manifest gets unaffiliated_repos[] append

Then:

  1. Update companies/manifest.yaml: append target path to {company}.repos[] (idempotent, sorted, no-op if present). For standalone: append to top-level unaffiliated_repos[].
  2. Register qmd collection:
    qmd collection add <path> --name <name> --mask "**/*.md" 2>/dev/null || true
    
  3. Drift gate: if the repo path already exists under a different company, STOP and surface via AskUserQuestion before overwriting.

Phase 3 — Fan-out exploration (parallel Agent calls, subagent_type=Explore)

Spawn these IN A SINGLE MESSAGE so they run concurrently. Each returns ≤500 words under fixed headings — orchestrator collates, does NOT re-read source files.

AgentBrief
Stack & architectureLanguages, frameworks (Next/Astro/Bun/Vite/Hono/Expo/etc.), entry points, package manager (lockfile-detected), build/test/lint commands, deploy target. Read package.json, pyproject.toml, Cargo.toml, go.mod, top-level configs.
Environment & services.env.example keys grouped by external service (Stripe, Clerk, Vercel, AWS, Shopify, etc.). Cross-link to companies/{co}.services[] in manifest.
Conventions & operationsTest strategy (unit/E2E presence), CI workflows under .github/workflows/, branching/PR rules from CONTRIBUTING.md / README, husky/lefthook hooks, .editorconfig, .prettierrc.
Domain & purpose (skip if README < 30 lines)What the product does, who it serves, public docs links, top-level modules.

Phase 4 — Synthesize knowledge

Target dir:

  • Company-owned: companies/<co>/knowledge/repos/<name>/
  • Standalone: core/knowledge/public/repos/<name>/

Write four files (overwrite on re-run; they're regenerated artifacts):

  • overview.md — purpose, stack summary, scale signals (file/line counts, contributors), default branch + last-commit ISO
  • architecture.md — entry points, top-level layout, key dependencies
  • environment.md — env-var table, external services, links to manifest service entries
  • conventions.md — test/lint/build commands, CI summary, branch model

Knowledge frontmatter (every file):

---
type: reference
domain: [engineering]
status: canonical
tags: [repo:<name>, discovered]
source: discover
generated_at: <ISO-8601 UTC>
head_sha: <sha>
relates_to: []
---

Phase 5 — Propose policies (conservative, user-gated)

Skip entirely if --no-policies. Otherwise propose ONLY when signal is unambiguous:

SignalDraft rule
pnpm-lock.yaml exists, no package-lock.json / yarn.lock / bun.lockUse pnpm; do not generate other lockfiles
bun.lock existsUse bun
Husky pre-commit runs lint/typecheck/testsPre-commit hook is authoritative; do not pass --no-verify
Single .github/workflows/deploy*.yml with explicit deploy commandDeploy via <workflow> only; no manual vercel deploy / netlify deploy
engines.node pin in package.json, or .nvmrc, or .python-versionUse <version> for this repo

Scope auto-decision (no prompt unless ambiguous):

HeuristicScope chosen
Signal references repo-unique paths/workflows/scriptsrepo → repos/{pub|priv}/<name>/.claude/policies/<id>.md
Same signal present in ≥2 sibling repos under {company}.repos[] (read-only, cap at 5 siblings)company → companies/<co>/policies/<id>.md
Standalone repo (no company)repo always
Tied / unclearDefault repo (narrower wins; widen later via /learn or /garden)

For each candidate, present via AskUserQuestion with options: Write, Edit then write, Skip. Never auto-write without confirmation.

Policy frontmatter (per core/knowledge/public/hq-core/policies-spec.md):

---
id: <scope-prefix>-<slug>          # e.g. <repo>-pnpm-only, <co>-pre-commit-authoritative
title: <short title>
scope: repo | company
trigger: <when this applies>
enforcement: soft                   # discover never produces hard policies — let user upgrade later
version: 1
created: <YYYY-MM-DD>
updated: <YYYY-MM-DD>
public: false                       # all discover-generated policies start private
source: discover
learned_from: discover/<repo>@<head_sha_short>
---

If ≥1 policy was written, stop — digests are retired. The next session will pick up new policies via inject-policy-on-trigger (SessionStart). Do not run build-policy-digest.sh (script removed).

Phase 6 — Index & report

  1. qmd update 2>/dev/null || true
  2. Print summary table:
    • Repo path, head SHA, default branch
    • Files written (count + paths)
    • Policies written (count + scopes)
    • Manifest changes (none / <co>.repos[] += / unaffiliated_repos[] +=)
  3. Suggest next: /run dev-team context-manager for deeper analysis, or /prd to start a project against this repo.

Idempotence guarantees

Re-run behaviorPhase
Latest main pulled (no-op if up to date)1
No manifest churn if already registered2
Knowledge files overwritten with fresh generated_at + head_sha4
Policies skipped if a file with same id already exists5

Out of scope

  • Auto-writing CLAUDE.md inside the discovered repo (user runs /init if desired)
  • Spawning workers for the repo (/newworker)
  • Branches other than default
  • Cross-repo dependency graphs

Safety

  • Never git reset --hard, never --force push, never delete files in target repo.
  • Working-tree dirty in an existing clone → bail with a clear "stash or commit first" message.
  • Drift between proposed and existing manifest entries → AskUserQuestion before overwrite.
  • All proposed policies are enforcement: soft and public: false — the user explicitly upgrades later.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

accept

무료

Accept HQ membership invites from a magic link or raw token.

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

indigoai-us/hq-core902026년 10월 26일 업데이트

adr

무료

Capture qualifying architecture decisions as ADRs in the right HQ or repo location.

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

indigoai-us/hq-core902026년 10월 26일 업데이트

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

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

indigoai-us/hq-core902026년 10월 26일 업데이트

architect

무료

Find shallow modules and propose deepening refactors, ranked with file refs; never edits code. Use when code is hard to change or planning a refactor.

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

indigoai-us/hq-core902026년 10월 26일 업데이트

Generate dark ASCII banner graphics for HQ and social launch assets.

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

indigoai-us/hq-core902026년 10월 26일 업데이트

Compare approaches to best-in-class prior art, merge existing work, verify cruft removal, and recommend the most durable design before PRD work.

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

indigoai-us/hq-core902026년 10월 26일 업데이트

indigoai-us의 스킬 모두 보기

이 스킬의 문제 신고