Agent skill

Architecture Design

by Galaxy-Dawn in Galaxy-Dawn/claude-scholar

Use only when creating new registrable ML components that require Factory or Registry patterns.

MITAuto-check passedDevelopment

Install Architecture Design

skills CLI
$ npx skills add Galaxy-Dawn/claude-scholar --skill architecture-design -a claude-code

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

GitHub CLI
$ gh skill install Galaxy-Dawn/claude-scholar architecture-design --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/Galaxy-Dawn/claude-scholar.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/architecture-design .claude/skills/architecture-design && 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
architecture-design
GitHub stars
5.7k
Used in
1 other repo
Token cost
~2.2k tokens
SKILL.md length
569 words
Files
11 (incl. references)
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Use only when creating new registrable ML components that require Factory or Registry patterns.

  • Works in 4 steps: Create file in src/data_module/dataset/ → Use @register_dataset("name") decorator → Inherit from torch.utils.data.Dataset → …
  • Development work in your project
  • SKILL.md covers Overview, When to Use, When Not to Use and Core Design Patterns, plus 6 more sections
  • Runs Python and Shell scripts from its folder

What it does

Architecture Design is an agent skill from Galaxy-Dawn/claude-scholar. Use only when creating new registrable ML components that require Factory or Registry patterns.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files, including reference files (for example `examples/augmentation_example.py`, `examples/config_example.yaml` and `examples/custom_dataset.py`).

It sits in Development. The repository describes itself as: Semi-automated research assistant for academic research and software development. Supports Claude Code, Codex CLI, Kimi Code CLI, and OpenCode across ideation, coding… The licence is MIT.

When your agent uses it

  • Development work in your project

Example prompts

  • “/architecture-design”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Create file in src/data_module/dataset/
  2. Use @register_dataset("name") decorator
  3. Inherit from torch.utils.data.Dataset
  4. Implement init, len, getitem

What it can do on your machine

Read from SKILL.md and the folder at commit 9037873. 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

    Ships script files (Python and Shell), which the agent can run.

    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

Architecture Design loads about 2.2k tokens when it runs, and up to ~6.7k if it reads all its reference files. Until then it costs about 29 tokens; SKILL.md has 569 words of instructions outside code blocks.

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

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 Galaxy-Dawn/claude-scholar at commit 9037873, republished under its MIT licence (© Galaxy-Dawn). 569 words, ~2,206 tokens.

Download SKILL.mdSave it as .claude/skills/architecture-design/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
architecture-design
description
Use only when creating new registrable ML components that require Factory or Registry patterns.
version
1.2.0

Architecture Design - ML Project Template

This skill defines the standard code architecture for machine learning projects based on the template structure. When modifying or extending code, follow these patterns to maintain consistency.

Overview

The project follows a modular, extensible architecture with clear separation of concerns. Each module (data, model, trainer, analysis) is independently organized using factory and registry patterns for maximum flexibility.

When to Use

Use this skill when:

  • Creating a new Dataset class that needs @register_dataset
  • Creating a new Model class that needs @register_model
  • Creating a new module directory with __init__.py factory wiring
  • Initializing a new ML project structure from scratch
  • Adding new component types such as Augmentation, CollateFunction, or Metrics

When Not to Use

Do not use this skill when:

  • Modifying existing functions or methods
  • Fixing bugs in existing code
  • Adding helper functions or utilities
  • Refactoring without adding new registrable components
  • Making simple code changes to a single file
  • Modifying configuration files
  • Reading or understanding existing code

Key indicator: if the task does not require a @register_* decorator or a Factory pattern, skip this skill.

Core Design Patterns

Factory Pattern

Each module uses a factory to create instances dynamically:

python
# Example from data_module/dataset/__init__.py
DATASET_FACTORY: Dict = {}

def DatasetFactory(data_name: str):
    dataset = DATASET_FACTORY.get(data_name, None)
    if dataset is None:
        print(f"{data_name} dataset is not implementation, use simple dataset")
        dataset = DATASET_FACTORY.get('simple')
    return dataset

For detailed guidance, refer to references/factory_pattern.md.

Registry Pattern

Components register themselves via decorators:

python
# Example from data_module/dataset/simple_dataset.py
@register_dataset("simple")
class SimpleDataset(Dataset):
    def __init__(self, data):
        self.data = data

For detailed guidance, refer to references/registry_pattern.md.

Auto-Import Pattern

Modules automatically discover and import submodules:

python
# Example from data_module/dataset/__init__.py
models_dir = os.path.dirname(__file__)
import_modules(models_dir, "src.data_module.dataset")

For detailed guidance, refer to references/auto_import.md.

Directory Structure

project/
├── run/
│   ├── pipeline/            # Main workflow scripts
│   │   ├── training/        # Training pipelines
│   │   ├── prepare_data/    # Data preparation pipelines
│   │   └── analysis/        # Analysis pipelines
│   └── conf/                # Hydra configuration files
│       ├── training/        # Training configs
│       ├── dataset/         # Dataset configs
│       ├── model/           # Model configs
│       ├── prepare_data/    # Data prep configs
│       └── analysis/        # Analysis configs
│
├── src/
│   ├── data_module/         # Data processing module
│   │   ├── dataset/         # Dataset implementations
│   │   ├── augmentation/    # Data augmentation
│   │   ├── collate_fn/      # Collate functions
│   │   ├── compute_metrics/ # Metrics computation
│   │   ├── prepare_data/    # Data preparation logic
│   │   ├── data_func/       # Data utility functions
│   │   └── utils.py         # Module-specific utilities
│   │
│   ├── model_module/        # Model implementations
│   │   ├── brain_decoder/   # Brain decoder models
│   │   └── model/           # Alternative model location
│   │
│   ├── trainer_module/      # Training logic
│   ├── analysis_module/     # Analysis and evaluation
│   ├── llm/                 # LLM-related code
│   └── utils/               # Shared utilities
│
├── data/
│   ├── raw/                 # Original, immutable data
│   ├── processed/           # Cleaned, transformed data
│   └── external/            # Third-party data
│
├── outputs/
│   ├── logs/                # Training and evaluation logs
│   ├── checkpoints/         # Model checkpoints
│   ├── tables/              # Result tables
│   └── figures/             # Plots and visualizations
│
├── pyproject.toml           # Project configuration
├── uv.lock                  # Dependency lock file
├── TODO.md                  # Task tracking
├── README.md                # Project documentation
└── .gitignore               # Git ignore rules

For detailed directory structure with file descriptions, refer to references/structure.md.

Module Organization

Creating a New Dataset

When adding a new dataset:

  1. Create file in src/data_module/dataset/
  2. Use @register_dataset("name") decorator
  3. Inherit from torch.utils.data.Dataset
  4. Implement __init__, __len__, __getitem__
python
from torch.utils.data import Dataset
from typing import Dict
import torch
from src.data_module.dataset import register_dataset

@register_dataset("custom")
class CustomDataset(Dataset):
    def __init__(self, data):
        self.data = data

    def __len__(self):
        return len(self.data)

    def __getitem__(self, i: int) -> Dict[str, torch.Tensor]:
        return self.data[i]
Creating a New Model

CRITICAL: Models use config-driven pattern

When adding a new model:

  1. Create file in src/model_module/model/ or appropriate module subdirectory
  2. Use @register_model('ModelName') decorator
  3. __init__ accepts ONLY cfg parameter - all hyperparameters come from config
  4. forward() returns dict: {"loss": loss, "labels": labels, "logits": logits}
  5. Handle training vs inference modes using self.training
python
from src.model_module.brain_decoder import register_model

@register_model('MyModel')
class MyModel(nn.Module):
    def __init__(self, cfg):
        super().__init__()
        self.cfg = cfg
        self.task = cfg.dataset.task

        # ALL parameters from cfg
        self.hidden_dim = cfg.model.hidden_dim
        self.output_dim = cfg.dataset.target_size[cfg.dataset.task]

    def forward(self, x, labels=None, **kwargs):
        if self.training:
            # Training logic
            pass
        else:
            # Inference logic
            pass

        return {"loss": loss, "labels": labels, "logits": logits}
Adding Data Augmentation

When adding augmentation:

  1. Create file in src/data_module/augmentation/
  2. Implement transformation function
  3. Register with factory if needed
Show full SKILL.md (227 more words)Show less

Code Style Guidelines

For comprehensive style guidelines, refer to references/code_style.md.

Key principles:

  • Always use type hints for function signatures
  • Follow import order: standard library → third-party → local
  • Module __init__.py files contain factory/registry logic
  • Model classes must be config-driven

Configuration Management

The project uses Hydra for configuration management:

  • Config files in run/conf/ organize by module
  • Each stage (training, analysis) has its own config structure
  • Use YAML files for all configuration

When Working on This Project

Before Modifying Code
  1. Read the relevant module's factory/registry pattern
  2. Check existing implementations for consistency
  3. Follow the established directory structure
  4. Use registration decorators for new components
Adding New Features
  1. Determine which module the feature belongs to
  2. Check if similar functionality exists
  3. Follow factory/registry pattern if creating new component types
  4. Add configuration files if needed
  5. Update documentation
Code Review Checklist
  • Uses factory/registry pattern appropriately
  • Follows module directory structure
  • Has proper type annotations
  • Imports are correctly ordered
  • Registration decorator is used
  • Configuration files are added if needed

Additional Resources

Reference Files

For detailed information, consult:

  • references/structure.md - Detailed directory structure with file descriptions
  • references/factory_pattern.md - Factory pattern in-depth explanation
  • references/registry_pattern.md - Registry pattern in-depth explanation
  • references/auto_import.md - Auto-import pattern in-depth explanation
  • references/code_style.md - Comprehensive code style guidelines
Example Files

Working examples in examples/:

  • examples/custom_dataset.py - Custom dataset implementation
  • examples/custom_model.py - Custom model implementation
  • examples/augmentation_example.py - Data augmentation example
  • examples/config_example.yaml - Configuration file example
  • examples/pipeline_example.sh - Pipeline script example

© Galaxy-Dawn, 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 10 other files (references) in skills/architecture-design of Galaxy-Dawn/claude-scholar.

  • SKILL.md
  • examples/augmentation_example.py
  • examples/config_example.yaml
  • examples/custom_dataset.py
  • examples/custom_model.py
  • examples/pipeline_example.sh
  • references/auto_import.md
  • references/code_style.md
  • references/factory_pattern.md
  • references/registry_pattern.md
  • references/structure.md

Open the folder on GitHubat commit 9037873

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in Galaxy-Dawn/claude-scholar, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Architecture Design 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.

Architecture Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Architecture Design this skillGalaxy-Dawn/claude-scholar5.7k1 repos~2.2kAutomated safety check: PassMIT
Vercel Composition Patternssupabase/supabase111k58 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k4 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 58 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 4 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from Galaxy-Dawn/claude-scholar

All 34 skills in this repo
  • Citation Verification Guide

    Galaxy-Dawn/claude-scholar

    Reference guidance for checking every citation in academic writing against canonical sources such as DOI, arXiv, CrossRef and Semantic Scholar, to catch fake or wrong references.

    5.7k GitHub starsUsed in 2 repos~1.9k tokens
    Auto-check passed
  • Skill Improvement Plan Executor

    Galaxy-Dawn/claude-scholar

    Reads an improvement-plan file from a companion quality-review skill and applies its suggested fixes to a Claude Skill, backing up first.

    5.7k GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Skill Quality Reviewer

    Galaxy-Dawn/claude-scholar

    Scores a skill across description, content organization, writing style and structure, then produces letter grades and a prioritized improvement plan.

    5.7k GitHub starsUsed in 1 repo~3k tokens
    Auto-check passed
  • UI/UX Design System Advisor

    Galaxy-Dawn/claude-scholar

    Turns a vague UI request into a concrete design system with style, palette, typography and layout guidance from a search script, plus stack-specific implementation advice.

    5.7k GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Daily Paper Digest

    Galaxy-Dawn/claude-scholar

    Finds recent arXiv and bioRxiv papers on a topic, narrows them in stages to one pick per field, and writes bilingual Chinese and English summaries.

    5.7k GitHub stars~1k tokensUpdated 17 days ago
    Auto-check passed
  • Nature Data

    Galaxy-Dawn/claude-scholar

    Prepare, audit, or revise Nature-ready Data Availability statements, data repository plans, dataset citations, and FAIR metadata checklists for manuscripts.

    5.7k GitHub starsUsed in 3 repos~1.6k tokens
    Auto-check passed

Categories

Questions about Architecture Design

What does Architecture Design do?

Use only when creating new registrable ML components that require Factory or Registry patterns. Architecture Design is an agent skill from Galaxy-Dawn/claude-scholar. Use only when creating new registrable ML components that require Factory or Registry patterns.

When should I use Architecture Design?

Architecture Design fits situations like: development work in your project.

How do I install Architecture Design in Claude Code?

Run `npx skills add Galaxy-Dawn/claude-scholar --skill architecture-design -a claude-code`. Or copy the skill folder (skills/architecture-design in Galaxy-Dawn/claude-scholar) into .claude/skills/architecture-design in your project. Claude Code loads it when a task matches its description.

How do I install Architecture Design in Codex?

Run `npx skills add Galaxy-Dawn/claude-scholar --skill architecture-design -a codex`. Or copy the skill folder (skills/architecture-design in Galaxy-Dawn/claude-scholar) into .agents/skills/architecture-design in your project. Codex loads it when a task matches its description.

Can I use Architecture Design 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 Galaxy-Dawn/claude-scholar --skill architecture-design -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-design, .gemini/skills/architecture-design, .github/skills/architecture-design and .opencode/skills/architecture-design in your project.

What does Architecture Design need to run?

Going by SKILL.md and its folder, Architecture Design needs Python and a shell for the scripts in its folder. Our summary lists: Python 3; A Bash shell.

Does Architecture Design 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 Architecture Design 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 Architecture Design use?

Architecture Design 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 Architecture Design use?

About 2.2k tokens (SKILL.md is roughly 8.8k 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 4.4k tokens, read only when the agent opens those files.

What are the alternatives to Architecture Design?

Skills that share tags, products or a category with Architecture Design: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 297k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Architecture Design?

Galaxy-Dawn (a GitHub user) maintains it in Galaxy-Dawn/claude-scholar, which has 5,725 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on September 23, 2026.

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