agentsclimarketplace

Project setup

Skill JeongHeonK/c-sharp-custom-marketplace/skills/project-setup

C#/.NET 프로젝트를 Claude Code용으로 초기화. CLAUDE.md 생성 + 컨텍스트 hook 설치 (Bash/PowerShell). Use when setting up new C# projects for Claude Code, migrating existing projects, or updating context hooks.From its SKILL.md

Install
npx -y skills add JeongHeonK/c-sharp-custom-marketplace --skill project-setup

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

7.8 KB, as published. Nobody here has run it

Project Setup

C#/.NET 프로젝트를 Claude Code용으로 초기화하는 스킬. CLAUDE.md 생성과 컨텍스트 hook(Bash/PowerShell)을 설치합니다.

Arguments

  • $ARGUMENTS[0]: 서브커맨드 (init | migrate | hooks)
  • $ARGUMENTS[1]: 대상 프로젝트 경로 (선택, 기본값: 현재 디렉토리)

서브커맨드

커맨드설명
init새 프로젝트 초기화 (CLAUDE.md 생성 + hook 설치)
migrate기존 CLAUDE.md에 Context Management 섹션 추가 + hook 설치
hookshook 스크립트만 설치/업데이트

Workflow

Step 1: 인자 파싱

서브커맨드 = $ARGUMENTS[0] (기본값: "init")
대상 경로 = $ARGUMENTS[1] (기본값: 현재 작업 디렉토리)

서브커맨드가 init, migrate, hooks 중 하나가 아니면:

  • 첫 번째 인자를 경로로 간주하고 서브커맨드를 init으로 설정

Step 2: C# 프로젝트 감지 (init/migrate)

hooks 서브커맨드인 경우 이 단계 건너뛰기.

  1. Glob으로 대상 경로에서 .sln, .csproj 파일 탐색
  2. .csproj 파일들을 Read하여 다음 정보 추출:
    • <TargetFramework> (예: net8.0, net9.0)
    • <OutputType> (예: WinExe, Exe, Library)
    • <UseWPF>true</UseWPF> 여부
    • <PackageReference> 목록 (주요 NuGet 패키지)
  3. 프로젝트 유형 판별:
OutputTypeUseWPF판별 결과
WinExetrueWPF Application
Exe-Console Application
Library-Class Library
-- (WebAPI 패키지 있음)ASP.NET WebAPI
-- (테스트 패키지 있음)Test Project
  1. 솔루션 구조 파악:
    • .sln 파일에서 프로젝트 목록 추출
    • src/tests 디렉토리 구조 확인

Step 3: Hook 스크립트 설치

OS 감지: uname -s 결과로 환경 판별:

uname -s 결과환경스크립트
LinuxLinux/WSLsetup.sh
DarwinmacOSsetup.sh
MINGW* / MSYS* / CYGWIN*Git Bash/MSYS2setup.sh
명령 실패 또는 그 외Windows (native)setup.ps1

Bash 환경 (Linux/macOS/WSL):

bash <plugin-path>/skills/project-setup/scripts/setup.sh <target-dir>

PowerShell 환경 (Windows):

pwsh <plugin-path>/skills/project-setup/scripts/setup.ps1 -TargetDir <target-dir>

<plugin-path>는 이 SKILL.md의 부모 디렉토리(skills/project-setup/)의 절대 경로입니다. setup 스크립트가 hook 파일 복사, 실행 권한 설정, 디렉토리 생성을 수행합니다.


Step 4: CLAUDE.md 생성 또는 업데이트

init 서브커맨드: CLAUDE.md 신규 생성

Write 도구로 <target>/CLAUDE.md 생성. references/claude-md-template.md 템플릿을 참조하여 Step 2에서 감지한 정보로 {변수}를 치환합니다.

  1. Read로 references/claude-md-template.md 읽기
  2. 템플릿의 {변수}를 Step 2 감지 결과로 치환
  3. 조건부 섹션 적용:
    • WPF 프로젝트가 아닌 경우: ### WPF/MVVM Patterns 섹션 제거 + Skill Workflows > Scaffolding 섹션 제거
    • 테스트 프로젝트가 없는 경우: ### Test Patterns 섹션 제거 + Build & Test Commands에서 Test 행 제거
    • TargetFramework < net8.0인 경우: ### C# 12 Features (.NET 8) 섹션 상단에 경고 노트 추가 (> ⚠ 현재 프로젝트는 {TargetFramework}입니다. C# 12 기능은 .NET 8+ 에서 사용 가능합니다.)
  4. Write로 <target>/CLAUDE.md 생성

migrate 서브커맨드: 기존 CLAUDE.md에 섹션 추가

  1. 기존 CLAUDE.md를 Read
  2. ## Context Management 섹션이 없으면 Edit으로 추가
  3. ## C#/.NET Quick Reference 섹션이 없으면 Edit으로 추가 (템플릿의 Quick Reference 전체)
  4. ## Detailed References 섹션이 없으면 Edit으로 추가 (기존 ## C#/.NET Coding Guidelines가 있으면 ## Detailed References로 리네임)
  5. ## Skill Workflows 섹션이 없으면 Edit으로 추가
  6. 기존 내용은 절대 삭제하지 않음

Step 5: settings.local.json 업데이트

  1. Read로 <target>/.claude/settings.local.json 읽기 (없으면 새로 생성)
  2. Step 3에서 감지한 OS에 따라 hook command 결정:
    • Bash 환경: bash scripts/hooks/<name>.sh
    • PowerShell 환경: pwsh scripts/hooks/<name>.ps1
  3. 기존 hooks 설정이 있으면 병합, 없으면 새로 추가:

Hook 등록 구조

{
  "hooks": {
    "SessionStart": [{ "matcher": "", "hooks": [{ "type": "command", "command": "<runner> scripts/hooks/session-start.<ext>" }] }],
    "PreCompact":   [{ "matcher": "", "hooks": [{ "type": "command", "command": "<runner> scripts/hooks/pre-compact.<ext>" }] }],
    "Stop":         [{ "matcher": "", "hooks": [{ "type": "command", "command": "<runner> scripts/hooks/session-complete.<ext>" }] }]
  }
}

<runner> / <ext> 치환:

환경<runner><ext>
Bash (Linux/macOS/WSL)bashsh
PowerShell (Windows)pwshps1
  1. 기존 설정이 있으면 hooks 키에 병합 (기존 hook은 유지)

Step 6: 검증 체크리스트

모든 설치가 완료된 후 검증:

  • scripts/hooks/session-start.sh + .ps1 존재
  • scripts/hooks/pre-compact.sh + .ps1 존재
  • scripts/hooks/session-complete.sh + .ps1 존재
  • scripts/hooks/lib/utils.sh + utils.ps1 존재
  • Bash 스크립트 실행 권한 확인 (Linux/macOS)
  • .claude/context/ 디렉토리 존재
  • .claude/learnings/ 디렉토리 존재
  • .claude/settings.local.json에 hook 등록 확인
  • CLAUDE.md에 ## C#/.NET Quick Reference 섹션 존재 (init/migrate)
  • CLAUDE.md에 ## Detailed References 섹션 존재 (init/migrate)
  • CLAUDE.md에 ## Skill Workflows 섹션 존재 (init/migrate)
  • 조건부 섹션 정상 적용: WPF가 아닌 경우 WPF 섹션 없음, 테스트 없는 경우 Test 섹션 없음

검증 실패 항목이 있으면 사용자에게 알리고 수동 조치 방법 안내.


현재 전달받은 인자

ARGUMENTS: $ARGUMENTS

실행 지시

위 ARGUMENTS를 파싱하여 워크플로우를 시작하세요.

ARGUMENTS가 비어있으면 init을 기본 서브커맨드로 사용하고, 현재 디렉토리를 대상으로 합니다.

호출 예시:

  • /project-setup → init + 현재 디렉토리
  • /project-setup init → init + 현재 디렉토리
  • /project-setup init /path/to/project → init + 지정 경로
  • /project-setup migrate → 기존 CLAUDE.md에 섹션 추가
  • /project-setup hooks → hook 스크립트만 설치
  • /project-setup /path/to/project → init + 지정 경로 (경로가 서브커맨드가 아닌 경우)

Error Handling

상황처리
.csproj 없음경고 출력 후 기본 CLAUDE.md 생성
CLAUDE.md 이미 존재 (init)사용자에게 덮어쓰기 확인 또는 migrate 제안
settings.local.json 파싱 실패백업 후 새로 생성
setup 스크립트 실행 실패에러 내용 출력 + 수동 설치 방법 안내

.gitignore 안내

설치 완료 후 사용자에게 .gitignore에 다음 추가를 안내:

# Claude Code context (auto-generated, session-specific)
.claude/context/
.claude/learnings/

scripts/hooks/는 팀 공유를 위해 커밋하는 것을 권장.

Keep looking

Skills are one crate of 626,474. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.