Skip to content

Merge push-oxyzmtvtwxls Into main#107

Merged
dclong merged 1 commit into
mainfrom
push-oxyzmtvtwxls
Jun 22, 2026
Merged

Merge push-oxyzmtvtwxls Into main#107
dclong merged 1 commit into
mainfrom
push-oxyzmtvtwxls

Conversation

@dclong

@dclong dclong commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@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 introduces a new Fish function agentsify to unify AI agent context files (CLAUDE.md and GEMINI.md) into AGENTS.md and establish a symlink from CLAUDE.md to AGENTS.md. The feedback suggests checking the exit status of argparse to handle option parsing errors gracefully, and optimizing the symlink creation process to avoid redundantly recreating the CLAUDE.md symlink if it already correctly points to AGENTS.md.

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 functions/agentsify.fish
Comment thread functions/agentsify.fish
@dclong dclong force-pushed the push-oxyzmtvtwxls branch from ccec56d to 34701b1 Compare June 22, 2026 03:39
@dclong

dclong commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@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 introduces a new Fish shell function, agentsify, which unifies AI agent context files like CLAUDE.md and GEMINI.md into AGENTS.md and creates a symlink from CLAUDE.md to AGENTS.md. The review feedback suggests enhancing the script's robustness by adding error handling to abort execution if mv or ln commands fail, and optimizing the symlink logic to avoid redundant deletion and recreation when the symlink is already correctly configured.

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 functions/agentsify.fish
Comment thread functions/agentsify.fish
@dclong dclong force-pushed the push-oxyzmtvtwxls branch from 34701b1 to 858d958 Compare June 22, 2026 03:46
@dclong

dclong commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@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 introduces a new Fish shell function agentsify (along with a helper _agentsify_usage) to unify AI agent context files (like CLAUDE.md and GEMINI.md) into a single AGENTS.md file and establish a symlink from CLAUDE.md to AGENTS.md. The review feedback suggests making the symlink creation idempotent and robust by checking if the symlink already correctly points to AGENTS.md before attempting to recreate it, and handling potential command failures properly.

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 functions/agentsify.fish
Comment on lines +70 to +84
# Link CLAUDE.md -> AGENTS.md, since the claude cli only reads CLAUDE.md.
set -l claude "$dir/CLAUDE.md"
if test -L "$claude"
set -l target (readlink "$claude")
if test "$target" != AGENTS.md
echo "Replacing CLAUDE.md symlink that pointed to $target"
end
rm -- "$claude"
end
if test -e "$claude"
echo (set_color $fish_color_error)"Error: a real CLAUDE.md remains; cannot create the symlink."(set_color normal) >&2
return 1
end
ln -s AGENTS.md "$claude"
echo "Linked CLAUDE.md -> AGENTS.md"

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

The current implementation unconditionally removes and recreates the CLAUDE.md symlink even if it already correctly points to AGENTS.md. This causes redundant disk writes and prints unnecessary output on subsequent runs. Additionally, if rm or ln -s fails, the function continues and prints a misleading success message.

We can make this function idempotent and robust by checking if the symlink is already correct, and by handling command failures using Fish's or return 1 pattern.

    # Link CLAUDE.md -> AGENTS.md, since the claude cli only reads CLAUDE.md.
    set -l claude "$dir/CLAUDE.md"
    set -l needs_link 1
    if test -L "$claude"
        set -l target (readlink "$claude")
        if test "$target" = AGENTS.md
            set needs_link 0
        else
            echo "Replacing CLAUDE.md symlink that pointed to $target"
            rm -- "$claude"
            or return 1
        end
    end
    if test "$needs_link" = 1
        if test -e "$claude"
            echo (set_color $fish_color_error)"Error: a real CLAUDE.md remains; cannot create the symlink."(set_color normal) >&2
            return 1
        end
        ln -s AGENTS.md "$claude"
        or return 1
        echo "Linked CLAUDE.md -> AGENTS.md"
    end

@dclong dclong merged commit 7375fc3 into main Jun 22, 2026
2 checks passed
@dclong dclong deleted the push-oxyzmtvtwxls branch June 23, 2026 12:36
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