ast-grep Structural Search
code-yeongyu/oh-my-openagent
Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.
Guides the design of safely disposable code through contracts (traits/interfaces) and dependency inversion.
$ npx skills add ktnyt/cclsp --skill architecture -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ktnyt/cclsp architecture --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ktnyt/cclsp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/architecture .claude/skills/architecture && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "architecture" agent skill from https://github.com/ktnyt/cclsp/tree/main/.claude/skills/architecture into .claude/skills/architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "architecture", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ktnyt/cclsp/tree/main/.claude/skills/architectureType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ktnyt/cclsp --skill architecture -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ktnyt/cclsp architecture --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ktnyt/cclsp.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/architecture .agents/skills/architecture && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "architecture" agent skill from https://github.com/ktnyt/cclsp/tree/main/.claude/skills/architecture into .agents/skills/architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "architecture", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ktnyt/cclsp --skill architecture -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ktnyt/cclsp architecture --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ktnyt/cclsp.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/architecture .cursor/skills/architecture && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "architecture" agent skill from https://github.com/ktnyt/cclsp/tree/main/.claude/skills/architecture into .cursor/skills/architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "architecture", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ktnyt/cclsp.git --path .claude/skills/architecture--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ktnyt/cclsp --skill architecture -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ktnyt/cclsp architecture --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ktnyt/cclsp.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/architecture .gemini/skills/architecture && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "architecture" agent skill from https://github.com/ktnyt/cclsp/tree/main/.claude/skills/architecture into .gemini/skills/architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "architecture", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ktnyt/cclsp architectureInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ktnyt/cclsp --skill architecture -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ktnyt/cclsp.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/architecture .github/skills/architecture && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "architecture" agent skill from https://github.com/ktnyt/cclsp/tree/main/.claude/skills/architecture into .github/skills/architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "architecture", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ktnyt/cclsp --skill architecture -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ktnyt/cclsp architecture --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ktnyt/cclsp.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/architecture .opencode/skills/architecture && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "architecture" agent skill from https://github.com/ktnyt/cclsp/tree/main/.claude/skills/architecture into .opencode/skills/architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "architecture", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
architectureGuides the design of safely disposable code through contracts (traits/interfaces) and dependency inversion.
Architecture is an agent skill from ktnyt/cclsp. Guides the design of safely disposable code through contracts (traits/interfaces) and dependency inversion. Use when designing new modules, refactoring existing code, or making architectural decisions about component boundaries.
Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Refactoring. It works with Model Context Protocol. The repository describes itself as: Claude Code LSP: enhance your Claude Code experience with non-IDE dependent LSP integration. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 93414a1. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are rust, go and typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Architecture loads about 1.6k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 476 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ktnyt/cclsp at commit 93414a1, republished under its MIT licence (© ktnyt). 476 words, ~1,587 tokens.
.claude/skills/architecture/SKILL.md (or your agent's skills folder).Every implementation should be disposable. The system's correctness is defined by its contracts, not by any particular implementation behind them.
Define what a component does (contract), not how it does it (implementation). Any implementation that satisfies the contract is interchangeable.
A component is "safely disposable" when:
Start with the contract. Write the trait/interface before any implementation.
Rust:
pub trait UserRepository {
fn find_by_id(&self, id: UserId) -> Result<Option<User>, RepoError>;
fn save(&self, user: &User) -> Result<(), RepoError>;
}Go:
type UserRepository interface {
FindByID(ctx context.Context, id UserID) (*User, error)
Save(ctx context.Context, user *User) error
}TypeScript:
interface UserRepository {
findById(id: UserId): Promise<User | null>;
save(user: User): Promise<void>;
}Rules:
UserRepository, not PostgresUserStore)Errors are part of the contract. Define domain-level error types that hide infrastructure details.
#[derive(Debug, thiserror::Error)]
pub enum RepoError {
#[error("entity not found: {0}")]
NotFound(String),
#[error("conflict: {0}")]
Conflict(String),
#[error("internal error")]
Internal(#[source] Box<dyn std::error::Error + Send + Sync>),
}The Internal variant wraps infrastructure errors without leaking them into the contract.
Each implementation is a disposable artifact. Write it knowing it can be thrown away.
pub struct PgUserRepository {
pool: PgPool,
}
impl UserRepository for PgUserRepository {
fn find_by_id(&self, id: UserId) -> Result<Option<User>, RepoError> {
// Postgres-specific code here.
// This entire struct is disposable.
}
fn save(&self, user: &User) -> Result<(), RepoError> {
// ...
}
}Consumers accept the contract, never the concrete type.
pub struct UserService<R: UserRepository> {
repo: R,
}
impl<R: UserRepository> UserService<R> {
pub fn new(repo: R) -> Self {
Self { repo }
}
pub fn get_user(&self, id: UserId) -> Result<Option<User>, RepoError> {
self.repo.find_by_id(id)
}
}In Go, this is implicit — accept the interface:
func NewUserService(repo UserRepository) *UserService {
return &UserService{repo: repo}
}Write tests that verify the contract, not the implementation. These tests can be reused across implementations.
// A test suite that works for ANY UserRepository implementation.
fn test_repository_contract(repo: &impl UserRepository) {
let user = User::new("test@example.com");
repo.save(&user).unwrap();
let found = repo.find_by_id(user.id()).unwrap();
assert_eq!(found, Some(user));
}
#[test]
fn pg_repo_satisfies_contract() {
let repo = PgUserRepository::new(test_pool());
test_repository_contract(&repo);
}
#[test]
fn in_memory_repo_satisfies_contract() {
let repo = InMemoryUserRepository::new();
test_repository_contract(&repo);
}Organize code so that dependencies always point inward toward the domain:
src/
├── domain/ # Contracts + domain types (zero external deps)
│ ├── model.rs # Domain entities and value objects
│ ├── repo.rs # Repository contracts (traits)
│ └── service.rs # Domain services using contracts
├── infra/ # Disposable implementations
│ ├── pg_repo.rs # Postgres implementation
│ └── http.rs # HTTP handlers
└── main.rs # Wiring (connects contracts to implementations)domain/ defines contracts and types. It imports nothing from infra/.infra/ implements contracts. It imports from domain/.main.rs wires implementations to contracts.Before considering a component done, verify:
| Anti-Pattern | Problem | Fix |
|---|---|---|
| Fat contract | 10+ methods, hard to implement | Split into focused contracts |
| Leaky contract | Infrastructure types in signatures | Use domain types only |
| Concrete dependency | Consumer imports the struct directly | Accept the trait/interface |
| God module | One module does everything | Extract contracts and split |
| Premature abstraction | Contract with only one possible implementation forever | Wait until there's a reason to abstract |
Not everything needs a contract. Skip abstraction when:
Start concrete, extract a contract when the second use case appears or when you need testability.
© ktnyt, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/architecture of ktnyt/cclsp.
Open the folder on GitHubat commit 93414a1
Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Architecture this skillktnyt/cclsp | 675 | — | ~1.6k | Automated safety check: Pass | MIT | |
| ast-grep Structural Searchcode-yeongyu/oh-my-openagent | 70k | — | ~3.3k | Automated safety check: Pass | MIT | |
| Graph-Guided Safe Refactoringtirth8205/code-review-graph | 32k | 1 repos | ~332 | Automated safety check: Pass | MIT | |
| Code Review Graph Navigatorhandsontable/handsontable | 22k | — | ~939 | Automated safety check: Pass | Custom licence | |
| Typed Dependencies with fp-go EffectIBM/fp-go | 2k | — | ~4.3k | Automated safety check: Pass | Apache-2.0 | |
| Filescope MCPadmica/FileScopeMCP | 302 | — | ~1.7k | Automated safety check: Pass | Proprietary |
code-yeongyu/oh-my-openagent
Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.
tirth8205/code-review-graph
Plans a refactor from a code dependency graph, previews renames before applying them and checks that the final impact matches the plan.
handsontable/handsontable
Queries a pre-built, Tree-sitter-based code graph of the whole monorepo instead of grepping call chains, for exploring, debugging, refactoring or reviewing code.
IBM/fp-go
Teaches an agent to write fp-go v2 services with the Effect type, carrying dependencies in its type parameter instead of in context.Context or parameters.
admica/FileScopeMCP
Codebase intelligence via FileScopeMCP — symbol lookup, dependency mapping, importance ranking, and semantic search.
ozgurcd/gograph
Gives an agent working in a Go codebase a structural view through a local MCP server: call graphs, blast-radius and impact analysis, and bounded first-call exploration.
ktnyt/cclsp
Performs manual hands-on testing of a web application using playwright-cli.
ktnyt/cclsp
Request a security expert assessment for code changes that touch child process spawning, file system access, configuration loading, or environment variable handling.
Works with
Categories
Guides the design of safely disposable code through contracts (traits/interfaces) and dependency inversion. Architecture is an agent skill from ktnyt/cclsp. Guides the design of safely disposable code through contracts (traits/interfaces) and dependency inversion.
Architecture fits situations like: designing new modules; refactoring existing code; making architectural decisions about component boundaries.
Run `npx skills add ktnyt/cclsp --skill architecture -a claude-code`. Or copy the skill folder (.claude/skills/architecture in ktnyt/cclsp) into .claude/skills/architecture in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ktnyt/cclsp --skill architecture -a codex`. Or copy the skill folder (.claude/skills/architecture in ktnyt/cclsp) into .agents/skills/architecture in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ktnyt/cclsp --skill architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/architecture, .gemini/skills/architecture, .github/skills/architecture and .opencode/skills/architecture in your project.
SKILL.md names no scripts, command-line tools or credentials: Architecture is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Architecture is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Architecture: ast-grep Structural Search (code-yeongyu/oh-my-openagent, 70k stars), Graph-Guided Safe Refactoring (tirth8205/code-review-graph, 32k stars), Code Review Graph Navigator (handsontable/handsontable, 22k stars) and Typed Dependencies with fp-go Effect (IBM/fp-go, 2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ktnyt (a GitHub user) maintains it in ktnyt/cclsp, which has 675 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on February 22, 2026.
Source: ktnyt/cclsp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.