Agent skill

Grasp Knowledge

by dykyi-roman in dykyi-roman/awesome-claude-code

GRASP principles knowledge base for PHP 8.4 projects. An agent skill from dykyi-roman/awesome-claude-code.

MITAuto-check passedKnowledge Management

Install Grasp Knowledge

skills CLI
$ npx skills add dykyi-roman/awesome-claude-code --skill grasp-knowledge -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dykyi-roman/awesome-claude-code grasp-knowledge --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/grasp-knowledge .claude/skills/grasp-knowledge && rm -rf skills-src

Use ~/.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/

Facts

Skill name
grasp-knowledge
GitHub stars
104
Token cost
~1.4k tokens
SKILL.md length
293 words
Files
12 (incl. references, assets)
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

GRASP principles knowledge base for PHP 8.4 projects. An agent skill from dykyi-roman/awesome-claude-code.

  • Architecture audits and design decisions
  • SKILL.md covers Overview, Quick Detection Patterns, Quick PHP 8.4 Examples and GRASP & DDD Integration, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Architecture decision records

What it does

Grasp Knowledge is an agent skill from dykyi-roman/awesome-claude-code. GRASP principles knowledge base for PHP 8.4 projects. Provides quick reference for 9 responsibility assignment patterns (Information Expert, Creator, Controller, Low Coupling, High Cohesion, Polymorphism, Pure Fabrication, Indirection, Protected Variations). Use for architecture audits and design decisions.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including reference files and assets (for example `assets/report-template.md`, `references/antipatterns.md` and `references/controller.md`).

It sits in Knowledge Management, covering Architecture decision records, Knowledge bases and Domain-driven design. It works with PHP. The repository describes itself as: PHP Architecture Toolkit for Claude Code (DDD, CQRS, Event Sourcing, Hexagonal, Clean Architecture, SOLID, GRASP, PSR, Design Patterns, Testing, Documentation, Code Review). The licence is MIT.

When your agent uses it

  • Architecture audits and design decisions
  • Tasks that involve Architecture decision records
  • Tasks that involve Knowledge bases

Example prompts

  • “/grasp-knowledge”

What it can do on your machine

Read from SKILL.md and the folder at commit 7e1fea8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and php).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Grasp Knowledge loads about 1.4k tokens when it runs, and up to ~27k if it reads all its reference files. Until then it costs about 81 tokens; SKILL.md has 293 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~81
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~27k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from dykyi-roman/awesome-claude-code at commit 7e1fea8, republished under its MIT licence (© dykyi-roman). 293 words, ~1,392 tokens.

Download SKILL.mdSave it as .claude/skills/grasp-knowledge/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
grasp-knowledge
description
GRASP principles knowledge base for PHP 8.4 projects. Provides quick reference for 9 responsibility assignment patterns (Information Expert, Creator, Controller, Low Coupling, High Cohesion, Polymorphism, Pure Fabrication, Indirection, Protected Variations). Use for architecture audits and design decisions.

GRASP Principles Knowledge Base

Overview

GRASP (General Responsibility Assignment Software Patterns) provides guidelines for assigning responsibilities to classes and objects in object-oriented design.

PrincipleCore QuestionGoal
Information ExpertWho has the data?Assign to class with information
CreatorWho creates objects?Assign creation responsibility
ControllerWho handles system events?Coordinate use case flow
Low CouplingHow to reduce dependencies?Minimize interconnections
High CohesionHow to focus responsibilities?Keep related things together
PolymorphismHow to handle type variations?Use polymorphic operations
Pure FabricationWhat if no domain class fits?Create artificial class
IndirectionHow to decouple?Add intermediate object
Protected VariationsHow to handle change?Hide variation points

Quick Detection Patterns

Information Expert Violations
bash
# Feature Envy: Class uses other class's data more
Grep: "->get.*->get.*->get" --glob "**/*.php"

# Train wreck calls
Grep: "->.*()->.*()->.*()->" --glob "**/*.php"

Signs: Method accesses other object's data extensively, data and behavior separated.

Creator Violations
bash
# Random creation locations
Grep: "new\s\+[A-Z][a-z]*[A-Z]" --glob "**/*.php"

Signs: Objects created in unexpected places, no clear creation ownership.

Controller Violations
bash
# Fat controllers (>100 lines)
find . -path "*/Controller/*.php" -exec wc -l {} \; | awk '$1 > 100'

# Business logic in controllers
Grep: "if.*&&.*||" --glob "*Controller.php"

Signs: Controller has >100 lines, business logic in controller.

Low Coupling Violations
bash
# High dependency count (>7)
Grep: "__construct" --glob "**/*.php" -A 15

# Concrete type dependencies
Grep: "function.*([A-Z][a-z]*[A-Z]" --glob "**/*.php"

Signs: Class has >7 dependencies, depends on concrete classes.

High Cohesion Violations
bash
# Unrelated method names
Grep: "public function" --glob "**/*.php" | grep -E "And[A-Z]|Or[A-Z]"

# Multiple responsibilities in class name
Grep: "class.*Manager|class.*Handler|class.*Processor" --glob "**/*.php"

Signs: Methods don't relate to each other, class does many unrelated things.

Quick PHP 8.4 Examples

Information Expert
php
// BAD: Logic outside of object with data
final class OrderService
{
    public function calculateTotal(Order $order): Money
    {
        $total = Money::zero();
        foreach ($order->getLines() as $line) {
            $total = $total->add($line->getProduct()->getPrice()->multiply($line->getQuantity()));
        }
        return $total;
    }
}

// GOOD: Logic in class that has the data
final class Order
{
    public function total(): Money
    {
        return array_reduce(
            $this->lines,
            fn(Money $sum, OrderLine $line) => $sum->add($line->total()),
            Money::zero(),
        );
    }
}
Low Coupling
php
// BAD: Depends on concrete classes
final class ReportGenerator
{
    public function __construct(
        private DoctrineOrderRepository $orders,
        private SymfonyMailer $mailer,
    ) {}
}

// GOOD: Depends on abstractions
final readonly class ReportGenerator
{
    public function __construct(
        private OrderReader $orders,
        private Mailer $mailer,
    ) {}
}
High Cohesion
php
// BAD: Low cohesion - unrelated responsibilities
final class UserManager
{
    public function register(array $data): User { }
    public function sendEmail(User $user): void { }
    public function generateReport(): string { }
}

// GOOD: High cohesion - focused responsibilities
final readonly class UserRegistrationService
{
    public function register(RegistrationData $data): User { }
    public function confirmEmail(Token $token): void { }
}

GRASP & DDD Integration

GRASPDDD Application
Information ExpertEntities contain their behavior
CreatorAggregates create their entities
ControllerApplication Services / Use Cases
Low CouplingBounded Context boundaries
High CohesionAggregate consistency boundary
PolymorphismDomain Services, Strategies
Pure FabricationRepositories, Factories, Specifications
IndirectionAnti-Corruption Layer, Adapters
Protected VariationsPorts & Adapters, Domain Events

References

For detailed patterns and examples, see references/:

  • information-expert.md — Tell Don't Ask, calculations in owner
  • creator.md — Factory patterns, aggregation rules
  • controller.md — Use case handlers, thin controllers
  • low-coupling.md — Dependency injection, abstractions
  • high-cohesion.md — Focused responsibilities
  • polymorphism.md — Strategy pattern, type variations
  • pure-fabrication.md — Repositories, specifications
  • indirection.md — Adapters, mediators
  • protected-variations.md — Stable interfaces
  • antipatterns.md — Common GRASP violations

Assets

  • assets/report-template.md — GRASP audit report format

© dykyi-roman, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 11 other files (references, assets) in skills/grasp-knowledge of dykyi-roman/awesome-claude-code.

  • SKILL.md
  • assets/report-template.md
  • references/antipatterns.md
  • references/controller.md
  • references/creator.md
  • references/high-cohesion.md
  • references/indirection.md
  • references/information-expert.md
  • references/low-coupling.md
  • references/polymorphism.md
  • references/protected-variations.md
  • references/pure-fabrication.md

Open the folder on GitHubat commit 7e1fea8

Compare with similar skills

Grasp Knowledge 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.

Grasp Knowledge compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Grasp Knowledge this skilldykyi-roman/awesome-claude-code104—~1.4kAutomated safety check: PassMIT
Capture Knowledgeadamayoung/TMDb178—~2.3kAutomated safety check: PassApache-2.0
Domain Modelingbrim-borium/spotify_sdk1665 repos~806Automated safety check: PassApache-2.0
Obsidian WriterAtmosphere/atmosphere3.8k—~2.6kAutomated safety check: PassApache-2.0
Domain Modelingvinvcn/mattpocock-skills-zh-CN4.7k—~477Automated safety check: PassMIT
Domain Modelingdevcxl/mattpocock-skills-zh449—~412Automated safety check: PassMIT

Similar skills

  • Capture Knowledge

    adamayoung/TMDb

    Records non-obvious lessons from a finished task, such as gotchas, API quirks and design decisions, into a project's knowledge folder before a pull request opens.

    178 GitHub stars~2.3k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Domain Modeling

    brim-borium/spotify_sdk

    Build and sharpen a project's domain model. An agent skill from brim-borium/spotify_sdk.

    166 GitHub starsUsed in 5 repos~806 tokens
    DevelopmentAuto-check passed
  • Obsidian Writer

    Atmosphere/atmosphere

    Write well-formatted notes to the atmosphere-vault Obsidian knowledge base.

    3.8k GitHub stars~2.6k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Domain Modeling

    vinvcn/mattpocock-skills-zh-CN

    构建并打磨项目的领域模型。适用于讨论 codebase 术语、编写或编辑 GLOSSARY.md,或记录或编辑 ADR。

    4.7k GitHub stars~477 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Domain Modeling

    devcxl/mattpocock-skills-zh

    构建和完善项目的领域模型。当讨论代码库术语、编写或编辑 GLOSSARY.md,或记录或编辑 ADR 时使用. An agent skill from devcxl/mattpocock-skills-zh.

    449 GitHub stars~412 tokensUpdated today
    DevelopmentAuto-check passed
  • Domain Modeling

    iurysza/module-graph

    Maintains project domain language, context maps, diagrams, and architectural decisions under ai-artifacts.

    420 GitHub stars~1.2k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from dykyi-roman/awesome-claude-code

All 11 skills in this repo
  • Psr Autoloading Knowledge

    dykyi-roman/awesome-claude-code

    PSR-4 autoloading standard knowledge base for PHP 8.4 projects.

    104 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Psr Coding Style Knowledge

    dykyi-roman/awesome-claude-code

    PSR-1 and PSR-12 coding standards knowledge base for PHP 8.4 projects.

    104 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Psr Overview Knowledge

    dykyi-roman/awesome-claude-code

    PHP Standards Recommendations (PSR) overview knowledge base.

    104 GitHub stars~2.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Solid Knowledge

    dykyi-roman/awesome-claude-code

    SOLID principles knowledge base for PHP 8.4 projects. An agent skill from dykyi-roman/awesome-claude-code.

    104 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Claude Code Knowledge

    dykyi-roman/awesome-claude-code

    Comprehensive knowledge base for Claude Code formats, patterns, and configuration.

    104 GitHub stars~4k tokensUpdated 1 mo ago
    Auto-check passed
  • Adr Knowledge

    dykyi-roman/awesome-claude-code

    Action-Domain-Responder pattern knowledge base. An agent skill from dykyi-roman/awesome-claude-code.

    104 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Grasp Knowledge

What does Grasp Knowledge do?

GRASP principles knowledge base for PHP 8.4 projects. An agent skill from dykyi-roman/awesome-claude-code. Grasp Knowledge is an agent skill from dykyi-roman/awesome-claude-code.4 projects.

When should I use Grasp Knowledge?

Grasp Knowledge fits situations like: architecture audits and design decisions; tasks that involve Architecture decision records; tasks that involve Knowledge bases.

How do I install Grasp Knowledge in Claude Code?

Run `npx skills add dykyi-roman/awesome-claude-code --skill grasp-knowledge -a claude-code`. Or copy the skill folder (skills/grasp-knowledge in dykyi-roman/awesome-claude-code) into .claude/skills/grasp-knowledge in your project. Claude Code loads it when a task matches its description.

How do I install Grasp Knowledge in Codex?

Run `npx skills add dykyi-roman/awesome-claude-code --skill grasp-knowledge -a codex`. Or copy the skill folder (skills/grasp-knowledge in dykyi-roman/awesome-claude-code) into .agents/skills/grasp-knowledge in your project. Codex loads it when a task matches its description.

Can I use Grasp Knowledge in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dykyi-roman/awesome-claude-code --skill grasp-knowledge -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/grasp-knowledge, .gemini/skills/grasp-knowledge, .github/skills/grasp-knowledge and .opencode/skills/grasp-knowledge in your project.

What does Grasp Knowledge need to run?

SKILL.md names no scripts, command-line tools or credentials: Grasp Knowledge is instructions for the agent only.

Does Grasp Knowledge access the network?

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.

Is Grasp Knowledge safe to install?

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.

What licence does Grasp Knowledge use?

Grasp Knowledge is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Grasp Knowledge use?

About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 25k tokens, read only when the agent opens those files.

What are the alternatives to Grasp Knowledge?

Skills that share tags, products or a category with Grasp Knowledge: Capture Knowledge (adamayoung/TMDb, 178 stars), Domain Modeling (brim-borium/spotify_sdk, 166 stars), Obsidian Writer (Atmosphere/atmosphere, 3.8k stars) and Domain Modeling (vinvcn/mattpocock-skills-zh-CN, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Grasp Knowledge?

dykyi-roman (a GitHub user) maintains it in dykyi-roman/awesome-claude-code, which has 104 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on August 16, 2026.

Source: dykyi-roman/awesome-claude-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.