Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions .agents/skills/cc-clip/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
```markdown
# cc-clip Development Patterns

> Auto-generated skill from repository analysis

## Overview
This skill covers the development patterns and workflows for the `cc-clip` Go codebase. It details coding conventions, commit patterns, testing approaches, and step-by-step instructions for key maintenance workflows. The repository focuses on remote environment detection, with robust error handling and testing for edge cases, especially in minimal or non-standard SSH/container setups.

## Coding Conventions

- **File Naming:**
Use `snake_case` for all file names.
_Example:_
```
main.go
n0_test.go
v070_probe_test.go
```

- **Import Style:**
Use relative imports within the module.
_Example:_
```go
import "../internal/shim"
```

- **Export Style:**
Use named exports for functions, types, and variables.
_Example:_
```go
func DetectRemoteEnv() error { ... }
```

- **Commit Messages:**
Follow [Conventional Commits](https://www.conventionalcommits.org/) with the `fix` prefix for bug fixes.
_Example:_
```
fix: handle error in remote detection for minimal containers
```

## Workflows

### Harden and Fix Remote Detection
**Trigger:** When you need to improve or fix the detection of remote environments, especially to handle edge cases or failures in minimal container images or non-standard SSH environments.
**Command:** `/harden-remote-detection`

1. **Update detection logic in the main command file**
Edit `cmd/cc-clip/main.go` to improve the robustness of remote environment detection.
_Example:_
```go
// Before
err := shim.CheckRemote()
// After
err := shim.SafeCheckRemote()
if err != nil {
log.Printf("Remote detection failed: %v", err)
}
```

2. **Modify or extend error handling for detection failures**
Ensure all edge cases and errors are handled gracefully, providing clear logs or fallback behaviors.

3. **Add or update tests for new detection logic or edge cases**
Update or create test files such as `cmd/cc-clip/n0_test.go` and `internal/shim/v070_probe_test.go` to cover new scenarios.
_Example:_
```go
func TestSafeCheckRemote_MinimalContainer(t *testing.T) {
// Simulate minimal container environment
err := SafeCheckRemote()
if err == nil {
t.Error("Expected error in minimal container, got nil")
}
}
```

4. **Update internal SSH or probe utilities if needed**
Refactor or extend files like `internal/shim/ssh.go` to support new detection logic or handle additional edge cases.

## Testing Patterns

- **Test File Naming:**
Test files follow the pattern `*_test.go` and are placed alongside the code they test.
_Example:_
```
n0_test.go
v070_probe_test.go
```

- **Framework:**
The testing framework is not explicitly specified, but standard Go testing (`testing` package) is assumed.

- **Test Example:**
```go
func TestDetectionLogic(t *testing.T) {
result := DetectRemoteEnv()
if result != nil {
t.Errorf("Expected nil, got %v", result)
}
}
```

## Commands

| Command | Purpose |
|--------------------------|------------------------------------------------------------------|
| /harden-remote-detection | Harden and fix remote environment detection logic and add tests. |
```
6 changes: 6 additions & 0 deletions .agents/skills/cc-clip/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
interface:
display_name: "Cc Clip"
short_description: "Repo-specific patterns and workflows for cc-clip"
default_prompt: "Use the cc-clip repo skill to follow existing architecture, testing, and workflow conventions."
policy:
allow_implicit_invocation: true
227 changes: 227 additions & 0 deletions .claude/ecc-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
{
"version": "1.3",
"schemaVersion": "1.0",
"generatedBy": "ecc-tools",
"generatedAt": "2026-06-28T11:07:44.476Z",
"repo": "https://github.com/ShunmeiCho/cc-clip",
"referenceSetReadiness": {
"score": 0,
"present": 0,
"total": 7,
"items": [
{
"id": "deep-analyzer-corpus",
"label": "Deep analyzer corpus",
"status": "missing",
"evidence": [],
"recommendation": "Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions."
},
{
"id": "rag-evaluator",
"label": "RAG/evaluator comparison",
"status": "missing",
"evidence": [],
"recommendation": "Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior."
},
{
"id": "pr-salvage",
"label": "PR salvage/review corpus",
"status": "missing",
"evidence": [],
"recommendation": "Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation."
},
{
"id": "discussion-triage",
"label": "Discussion triage corpus",
"status": "missing",
"evidence": [],
"recommendation": "Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications."
},
{
"id": "harness-compatibility",
"label": "Harness compatibility",
"status": "missing",
"evidence": [],
"recommendation": "Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces."
},
{
"id": "security-evidence",
"label": "Security evidence",
"status": "missing",
"evidence": [],
"recommendation": "Attach security evidence such as SBOMs, SARIF, audit reports, or AgentShield evidence packs."
},
{
"id": "ci-failure-mode",
"label": "CI failure-mode evidence",
"status": "missing",
"evidence": [],
"recommendation": "Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes."
}
]
},
"profiles": {
"requested": "core",
"recommended": "core",
"effective": "core",
"requestedAlias": "core",
"recommendedAlias": "core",
"effectiveAlias": "core"
},
"requestedProfile": "core",
"profile": "core",
"recommendedProfile": "core",
"effectiveProfile": "core",
"tier": "free",
"requestedComponents": [
"repo-baseline"
],
"selectedComponents": [
"repo-baseline"
],
"requestedAddComponents": [],
"requestedRemoveComponents": [],
"blockedRemovalComponents": [],
"tierFilteredComponents": [],
"requestedRootPackages": [
"runtime-core"
],
"selectedRootPackages": [
"runtime-core"
],
"requestedPackages": [
"runtime-core"
],
"requestedAddPackages": [],
"requestedRemovePackages": [],
"selectedPackages": [
"runtime-core"
],
"packages": [
"runtime-core"
],
"blockedRemovalPackages": [],
"tierFilteredRootPackages": [],
"tierFilteredPackages": [],
"conflictingPackages": [],
"dependencyGraph": {
"runtime-core": []
},
"resolutionOrder": [
"runtime-core"
],
"requestedModules": [
"runtime-core"
],
"selectedModules": [
"runtime-core"
],
"modules": [
"runtime-core"
],
"managedFiles": [
".claude/skills/cc-clip/SKILL.md",
".agents/skills/cc-clip/SKILL.md",
".agents/skills/cc-clip/agents/openai.yaml",
".claude/identity.json",
".codex/config.toml",
".codex/AGENTS.md",
".codex/agents/explorer.toml",
".codex/agents/reviewer.toml",
".codex/agents/docs-researcher.toml",
".claude/homunculus/instincts/inherited/cc-clip-instincts.yaml"
],
"packageFiles": {
"runtime-core": [
".claude/skills/cc-clip/SKILL.md",
".agents/skills/cc-clip/SKILL.md",
".agents/skills/cc-clip/agents/openai.yaml",
".claude/identity.json",
".codex/config.toml",
".codex/AGENTS.md",
".codex/agents/explorer.toml",
".codex/agents/reviewer.toml",
".codex/agents/docs-researcher.toml",
".claude/homunculus/instincts/inherited/cc-clip-instincts.yaml"
]
},
"moduleFiles": {
"runtime-core": [
".claude/skills/cc-clip/SKILL.md",
".agents/skills/cc-clip/SKILL.md",
".agents/skills/cc-clip/agents/openai.yaml",
".claude/identity.json",
".codex/config.toml",
".codex/AGENTS.md",
".codex/agents/explorer.toml",
".codex/agents/reviewer.toml",
".codex/agents/docs-researcher.toml",
".claude/homunculus/instincts/inherited/cc-clip-instincts.yaml"
]
},
"files": [
{
"moduleId": "runtime-core",
"path": ".claude/skills/cc-clip/SKILL.md",
"description": "Repository-specific Claude Code skill generated from git history."
},
{
"moduleId": "runtime-core",
"path": ".agents/skills/cc-clip/SKILL.md",
"description": "Codex-facing copy of the generated repository skill."
},
{
"moduleId": "runtime-core",
"path": ".agents/skills/cc-clip/agents/openai.yaml",
"description": "Codex skill metadata so the repo skill appears cleanly in the skill interface."
},
{
"moduleId": "runtime-core",
"path": ".claude/identity.json",
"description": "Suggested identity.json baseline derived from repository conventions."
},
{
"moduleId": "runtime-core",
"path": ".codex/config.toml",
"description": "Repo-local Codex MCP and multi-agent baseline aligned with ECC defaults."
},
{
"moduleId": "runtime-core",
"path": ".codex/AGENTS.md",
"description": "Codex usage guide that points at the generated repo skill and workflow bundle."
},
{
"moduleId": "runtime-core",
"path": ".codex/agents/explorer.toml",
"description": "Read-only explorer role config for Codex multi-agent work."
},
{
"moduleId": "runtime-core",
"path": ".codex/agents/reviewer.toml",
"description": "Read-only reviewer role config focused on correctness and security."
},
{
"moduleId": "runtime-core",
"path": ".codex/agents/docs-researcher.toml",
"description": "Read-only docs researcher role config for API verification."
},
{
"moduleId": "runtime-core",
"path": ".claude/homunculus/instincts/inherited/cc-clip-instincts.yaml",
"description": "Continuous-learning instincts derived from repository patterns."
}
],
"workflows": [],
"adapters": {
"claudeCode": {
"skillPath": ".claude/skills/cc-clip/SKILL.md",
"identityPath": ".claude/identity.json",
"commandPaths": []
},
"codex": {
"configPath": ".codex/config.toml",
"agentsGuidePath": ".codex/AGENTS.md",
"skillPath": ".agents/skills/cc-clip/SKILL.md"
}
}
}
Loading