Skip to content

feat: load mini-agent skills directories#76

Merged
kowyo merged 2 commits into
mainfrom
feat/mini-agent-skills-dir
Jun 20, 2026
Merged

feat: load mini-agent skills directories#76
kowyo merged 2 commits into
mainfrom
feat/mini-agent-skills-dir

Conversation

@kowyo

@kowyo kowyo commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • load skills from ~/.mini-agent/skills and project .mini-agent/skills
  • preserve existing .agents/skills support
  • give .mini-agent/skills precedence over .agents/skills within the same scope

Verification

  • make check
  • make type-check
  • local smoke test covering duplicate skill names across home/project .agents and .mini-agent directories

Review in cubic

kowyo and others added 2 commits June 20, 2026 12:23
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@kowyo kowyo merged commit c8f7495 into main Jun 20, 2026
17 checks passed
@kowyo kowyo deleted the feat/mini-agent-skills-dir branch June 20, 2026 04:25

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for .mini-agent/skills directories in both home and project scopes, updating the documentation and the configuration paths. Feedback was provided to deduplicate the paths in SKILLS_DIRS to prevent scanning the same directories twice when the working directory is the user's home directory.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/mini_agent/config.py
Comment on lines +34 to +39
SKILLS_DIRS = [
HOME_SKILLS_DIR,
HOME_MINI_AGENT_SKILLS_DIR,
PROJECT_SKILLS_DIR,
PROJECT_MINI_AGENT_SKILLS_DIR,
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

When the current working directory (WORKDIR) is the user's home directory, HOME_SKILLS_DIR and PROJECT_SKILLS_DIR (as well as HOME_MINI_AGENT_SKILLS_DIR and PROJECT_MINI_AGENT_SKILLS_DIR) will point to the exact same paths. This results in duplicate paths in SKILLS_DIRS, causing the skill loader to scan the same directories and parse the same files twice.

Deduplicating the paths while preserving their order avoids this redundant work.

Suggested change
SKILLS_DIRS = [
HOME_SKILLS_DIR,
HOME_MINI_AGENT_SKILLS_DIR,
PROJECT_SKILLS_DIR,
PROJECT_MINI_AGENT_SKILLS_DIR,
]
SKILLS_DIRS: list[Path] = []
for d in [
HOME_SKILLS_DIR,
HOME_MINI_AGENT_SKILLS_DIR,
PROJECT_SKILLS_DIR,
PROJECT_MINI_AGENT_SKILLS_DIR,
]:
if d not in SKILLS_DIRS:
SKILLS_DIRS.append(d)

@greptile-apps

greptile-apps Bot commented Jun 20, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds ~/.mini-agent/skills and .mini-agent/skills as additional skill directories, giving them precedence over the existing .agents/skills directories within the same scope. The documentation is updated to reflect the four supported locations and the tie-breaking rule.

  • config.py adds two new Path constants and slots them immediately after the corresponding .agents/skills entry in SKILLS_DIRS, so the last-writer-wins iteration in SkillLoader._load_all naturally enforces .mini-agent/skills > .agents/skills within each scope, and project scope > home scope.
  • docs/skills.md lists all four locations and documents the same-scope precedence rule accurately.

Confidence Score: 5/5

Safe to merge — the change is a minimal, additive extension to an existing list with no behavioural regressions on existing paths.

Two new Path constants are inserted at the correct positions in SKILLS_DIRS so that the loader's last-writer-wins iteration enforces the documented precedence. The documentation accurately reflects the implementation. No existing paths are reordered or removed.

No files require special attention.

Important Files Changed

Filename Overview
src/mini_agent/config.py Adds HOME_MINI_AGENT_SKILLS_DIR and PROJECT_MINI_AGENT_SKILLS_DIR constants, inserts them into SKILLS_DIRS after their .agents counterparts — correctly ordering them for last-wins precedence in the loader.
docs/skills.md Adds the two new skill directory paths and an accurate same-scope precedence note; content matches implementation behaviour.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[SkillLoader._load_all] --> B[Iterate SKILLS_DIRS in order]
    B --> C["~/.agents/skills\n(HOME_SKILLS_DIR)"]
    C --> D["~/.mini-agent/skills\n(HOME_MINI_AGENT_SKILLS_DIR)"]
    D --> E[".agents/skills\n(PROJECT_SKILLS_DIR)"]
    E --> F[".mini-agent/skills\n(PROJECT_MINI_AGENT_SKILLS_DIR)"]
    C -->|rglob SKILL.md| G[skills dict assignment\nlast-writer wins]
    D -->|rglob SKILL.md| G
    E -->|rglob SKILL.md| G
    F -->|rglob SKILL.md| G
    G --> H{Duplicate name?}
    H -->|Yes| I[Later directory overwrites earlier]
    H -->|No| J[New entry added]
    I --> K[Final skills dict\nhighest precedence = .mini-agent/skills project]
    J --> K
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[SkillLoader._load_all] --> B[Iterate SKILLS_DIRS in order]
    B --> C["~/.agents/skills\n(HOME_SKILLS_DIR)"]
    C --> D["~/.mini-agent/skills\n(HOME_MINI_AGENT_SKILLS_DIR)"]
    D --> E[".agents/skills\n(PROJECT_SKILLS_DIR)"]
    E --> F[".mini-agent/skills\n(PROJECT_MINI_AGENT_SKILLS_DIR)"]
    C -->|rglob SKILL.md| G[skills dict assignment\nlast-writer wins]
    D -->|rglob SKILL.md| G
    E -->|rglob SKILL.md| G
    F -->|rglob SKILL.md| G
    G --> H{Duplicate name?}
    H -->|Yes| I[Later directory overwrites earlier]
    H -->|No| J[New entry added]
    I --> K[Final skills dict\nhighest precedence = .mini-agent/skills project]
    J --> K
Loading

Reviews (1): Last reviewed commit: "feat: load home mini-agent skills" | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant