• 陸以橋

    本帖使用社区开源推广,符合推广要求。我申明并遵循社区要求的以下内容:

    - 我的帖子已经打上 开源推广 标签: 是

    - 我的开源项目完整开源,无未开源部分: 是

    - 我的开源项目已链接认可 LINUX DO 社区: 是

    - 我帖子内的项目介绍,AI生成、润色内容部分已截图发出: 是

    - 以上选择我承诺是永久有效的,接受社区和佬友监督: 是

    以下为项目介绍正文内容,AI生成、润色内容已使用截图方式发出


    claude-keysmith更新的速度超出了我的预计,话不多说,直接上效果图:

    安全工具方向

    图片

    图片

    图片

    化学研究方向

    机械工程

    图片

    图片

    机械工程方向

    图片

    图片

    图片

    图片

    图片

    NSFW方向

    图片

    上述环境为MacOS,Claude Code,Opus5

    在我其他帖子有相关信息,评论区也有很多佬的使用经验,Fable也能有一定效果:

    本帖使用社区开源推广,符合推广要求。我申明并遵循社区要求的以下内容:

    我的帖子已经打上 开源推广 标签: 是
    我的开源项目完整开源,无未开源部分: 是
    我的开源项目已链接认可 LINUX DO 社区: 是
    我帖子内的项目介绍,AI生成、润色内容部分已截图发出: 是
    以上选择我承诺是永久有效的,接受社区和佬友监督: 是

    以下为项目介绍正文内容,AI生成、润色内容已使用截图方式发出
    上一篇帖子我…

    https://linux.do/t/topic/2663369

    [image]
    改本地文件的方式还是有效的,但是使用起来太麻烦了
    感觉有点难产,有没有佬能指点下

    也欢迎继续在这个帖子分享经验和反馈。

    Codex破限工具也就issue提到的Bug进行了修复更新:

    github.com

    图片

    GitHub - Jia-Ethan/codex-keysmith: Version-independent Codex instruction deployment...

    Version-independent Codex instruction deployment with dry-run, backups, hook isolation, and recovery.

    最后是在原仓库更新的本工具:

    github.com

    图片

    GitHub - Jia-Ethan/claude-keysmith: Claude Code CLAUDE.md import-block installer for...

    Claude Code CLAUDE.md import-block installer for local instruction files

    期待各位佬的反馈和建议!

    主楼
  • 打不过你就跑快点

    佬在这方面的研究真的是孜孜不倦,前排支持

    #1
  • CastleDot_-_段凇云

    前来支持!感谢巨佬!!!!!!!

    #2
  • 小米

    必须支持佬一下 一直在用 居然还在更新优化 太牛了

    #3
  • blur

    点个star支持一下,马上整来试试

    #4
  • slxmjdo

    佬友太强了,没想到一直在更新工具,佩服佩服

    #5
  • sbarbar

    牛的。马上来测试下效果如何,这个会和别的提示词冲突吗

    #6
  • Ray170910

    牛啊牛啊 直接测试下效果如何 ^-^

    #7
  • shawny

    佬,这么快就来了啊。 感谢感谢~

    #8
  • 辰笙

    佬牛逼,必须支持,不过grok版本涉及版权还是不太行

    #9
  • 陸以橋

    grok等等新模型更新宝子,我的grok蠢得要死现在根本开发不了

    #10
  • boys_boyboy

    终于等到佬的更新马上下载更新。codex随便也升级下

    #11
  • boys_boyboy

    用codex修复了windows环境问题,供佬们参考:

    Windows 修复方法

    1. 修正用户目录解析

    原代码在 Windows 使用 Path.home(),测试设置的 HOME 不生效。新增:

    def resolve_home() → Path:

    configured = (

    os.environ.get(“CLAUDE_KEYSMITH_HOME”)

    or os.environ.get(“HOME”)

    )

    if configured:

    return Path(configured).expanduser().resolve()

    return Path.home().resolve()

    然后将 user scope 中的:

    Path.home()

    替换为:

    resolve_home()

    2. 自动识别 PowerShell

    def runtime_shell_kind() → str:

    configured = os.environ.get(

    “CLAUDE_KEYSMITH_SHELL”, “”

    ).strip().lower()```
    if configured:
    return configured

    return "powershell" if os.name == "nt" else "zsh"
    ```3. 定位 PowerShell Profile

    def powershell_profile_path(home: Path) → Path:

    configured = os.environ.get(“CLAUDE_KEYSMITH_SHELL_RC”)

    if configured:

    return Path(configured).expanduser().resolve()```
    module_path = os.environ.get("PSModulePath", "")
    profile_dir = (
    "WindowsPowerShell"
    if "WindowsPowerShell" in module_path
    else "PowerShell"
    )

    return (
    home
    / "Documents"
    / profile_dir
    / "Microsoft.PowerShell_profile.ps1"
    )
    ```4. 定位 Windows Claude CLI

    def find_claude_binary(home: Path, shell_kind: str) → Path:

    configured = os.environ.get(“CLAUDE_KEYSMITH_CLAUDE_BIN”)

    if configured:

    return Path(configured).expanduser().resolve()```
    if shell_kind == "powershell":
    found = (
    shutil.which("claude.cmd")
    or shutil.which("claude.exe")
    or shutil.which("claude")
    )
    if found:
    return Path(found).resolve()

    appdata = Path(
    os.environ.get(
    "APPDATA",
    str(home / "AppData" / "Roaming"),
    )
    )
    return appdata / "npm" / "claude.cmd"

    found = shutil.which("claude")
    return (
    Path(found).resolve()
    if found
    else home / ".local" / "bin" / "claude"
    )
    ```5. 生成 PowerShell Wrapper

    def powershell_quote(value: Path) → str:

    return “'” + str(value).replace(“'”, “‘’”) + “'”

    def render_powershell_wrapper(

    claude_bin: Path,

    system_prompt: Path,

    append_prompt: Path,

    ) → str:

    return “\n”.join([

    “# >>> claude-keysmith runtime >>>”,

    “# Managed by claude-keysmith. Do not edit by hand.”,

    “function global:claude {”,

    f" & {powershell_quote(claude_bin)} `“,

    f” --system-prompt-file {powershell_quote(system_prompt)} `“,

    f” --append-system-prompt-file {powershell_quote(append_prompt)} `“,

    " @args”,

    “}”,

    “# <<< claude-keysmith runtime <<<”,

    “”,

    ])

    6. 统一运行时路径

    将原来的固定字段:

    “zshrc”: home / “.zshrc”,

    “claude_bin”: home / “.local” / “bin” / “claude”,

    改成:

    “shell_kind”: shell_kind,

    “shell_rc”: shell_rc,

    “claude_bin”: find_claude_binary(home, shell_kind),

    安装、状态检查、卸载和 doctor 中统一使用:

    rt[“shell_rc”]

    rt[“shell_kind”]

    而不是固定使用:

    rt[“zshrc”]

    7. 测试

    python -m py_compile .\claude-instruct.py

    python -m pytest -q

    当前修复结果:

    25 passed

    8. Windows 安装验证

    python .\claude-instruct.py install --scope user --runtime

    python .\claude-instruct.py install --scope user --runtime --yes

    python .\claude-instruct.py status --scope user --runtime --json

    . $PROFILE

    claude --version

    #12
  • boys_boyboy

    但是目前我用了楼主的第一个安全工具测试,好像opus直接黄字警告,4.8也不行。

    #13

发表回复

登录后回复