Merge push-oxyzmtvtwxls Into main#107
Conversation
There was a problem hiding this comment.
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.
ccec56d to
34701b1
Compare
|
/gemini review |
There was a problem hiding this comment.
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.
34701b1 to
858d958
Compare
|
/gemini review |
There was a problem hiding this comment.
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.
| # 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" |
There was a problem hiding this comment.
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
No description provided.