Codex skill for scanning the current conversation for user habit phrase candidates and confirming them in place through user-habit-pipeline.
Use it when you want current-session habit management to happen inside the normal Codex thread instead of through transcript-file hunting or manual backend commands.
Related entrypoints:
- Backend package: user-habit-pipeline on npm
- Backend repo: pingzi-crypto/user-habit-pipeline
- External consumer demo: pingzi-crypto/user-habit-pipeline-codex-demo
This repository is the thin Codex app bridge for user habit memory, current-session phrase scanning, and in-thread confirmation of repeated user shorthand.
Windows:
$repo = Join-Path $HOME ".codex/repos/manage-current-session-habits"
if (Test-Path -LiteralPath $repo) {
git -C $repo pull --ff-only origin main
} else {
git clone https://github.com/pingzi-crypto/manage-current-session-habits.git $repo
if ($LASTEXITCODE -ne 0) {
git clone git@github.com:pingzi-crypto/manage-current-session-habits.git $repo
}
}
& (Join-Path $repo "install.ps1")macOS / Linux:
repo="$HOME/.codex/repos/manage-current-session-habits"
if [ -d "$repo/.git" ]; then
git -C "$repo" pull --ff-only origin main
else
git clone https://github.com/pingzi-crypto/manage-current-session-habits.git "$repo" ||
git clone git@github.com:pingzi-crypto/manage-current-session-habits.git "$repo"
fi
bash "$repo/install.sh"Prerequisites for these paths:
- Windows:
git,pwsh, andnode - macOS / Linux:
git,bash, andnode
This clones or refreshes the skill into a default local checkout, installs it into Codex, and runs the smoke check. It prefers the public HTTPS GitHub clone path and falls back to SSH when HTTPS clone is blocked but SSH access is available.
Optional convenience bootstrap if your environment can fetch from raw.githubusercontent.com:
Windows:
$bootstrap = Join-Path $env:TEMP "manage-current-session-habits-bootstrap.ps1"
Invoke-WebRequest https://raw.githubusercontent.com/pingzi-crypto/manage-current-session-habits/main/bootstrap-install.ps1 -OutFile $bootstrap
& $bootstrapmacOS / Linux:
bootstrap="${TMPDIR:-/tmp}/manage-current-session-habits-bootstrap-install.sh"
curl -fsSL https://raw.githubusercontent.com/pingzi-crypto/manage-current-session-habits/main/bootstrap-install.sh -o "$bootstrap"
bash "$bootstrap"If you prefer to inspect the repository first, use the manual path:
- Clone this repository.
- Make sure your platform prerequisites are available on
PATH. - Run:
# Windows
./install.ps1# macOS / Linux
bash ./install.sh- In a normal Codex conversation, say:
扫描这次会话里的习惯候选添加第1条忽略第1条列出用户习惯短句
This installs the skill and runs the smoke check in one step. If the smoke check passes, the current-session bridge is installed correctly. That smoke check now verifies list, scan, and cached follow-up apply through the installed wrapper.
If you are not installing this skill and instead want to build your own Codex-style host integration on top of the backend contract, start from the packaged backend starter:
npx user-habit-pipeline-init-consumer --host codex --out .\habit-pipeline-codex-starterThat backend starter gives you the smallest copyable scan/apply wrapper around codex-session-habits.
If you want to see that backend path already running in a clean outside project, open:
If you want to keep using a local backend checkout instead of the published npm package, install with:
# Windows
./install.ps1 -BackendRepoPath /path/to/user-habit-pipeline# macOS / Linux
bash ./install.sh --backend-repo-path /path/to/user-habit-pipelineIf you want bootstrap mode but with an explicit local checkout path:
# Windows
$bootstrap = Join-Path $env:TEMP "manage-current-session-habits-bootstrap.ps1"
Invoke-WebRequest https://raw.githubusercontent.com/pingzi-crypto/manage-current-session-habits/main/bootstrap-install.ps1 -OutFile $bootstrap
& $bootstrap -InstallRoot "$HOME/.codex/repos"# macOS / Linux
bootstrap="${TMPDIR:-/tmp}/manage-current-session-habits-bootstrap-install.sh"
curl -fsSL https://raw.githubusercontent.com/pingzi-crypto/manage-current-session-habits/main/bootstrap-install.sh -o "$bootstrap"
bash "$bootstrap" --install-root "$HOME/.codex/repos"If you only want a preview of what would be installed:
# Windows
./install.ps1 -CheckOnly# macOS / Linux
bash ./install.sh --check-onlyTo remove the installed skill link and generated local runtime files:
# Windows
./uninstall.ps1# macOS / Linux
bash ./uninstall.shThis removes:
- the Codex skill link pointing at this repository
config/local-config.jsonconfig/npm-backend/
It does not delete the repository checkout itself.
If you want to preview the uninstall first:
# Windows
./uninstall.ps1 -CheckOnly# macOS / Linux
bash ./uninstall.sh --check-onlyIf you want to keep the generated backend runtime but remove the installed skill link:
# Windows
./uninstall.ps1 -KeepGeneratedBackend# macOS / Linux
bash ./uninstall.sh --keep-generated-backendCross-platform note:
Windows still ships PowerShell entrypoints, but macOS / Linux now have native sh install, uninstall, bootstrap, and smoke wrappers backed by the same Node implementation. The repository smoke matrix validates Windows, macOS, and Linux against those public entrypaths.
- scans the current visible Codex thread for habit candidates
- lets the user confirm or ignore candidates with short follow-up prompts
- lists or removes already saved user habit phrases
- keeps the interaction inside the conversation UI
- stays aligned with the backend
codex-session-habitscontract instead of inventing a separate host protocol
- Codex app skill for scanning the current conversation for repeated user phrases
- AI assistant habit manager that stays inside the chat UI
- in-thread user preference capture without transcript-file hunting
- lightweight bridge from Codex conversations into
user-habit-pipeline - explicit add / ignore / list / remove flow for user shorthand phrases
Typical flow:
user: 扫描这次会话里的习惯候选
assistant: 这次会话共发现 1 条习惯候选……
user: 添加第1条
assistant: 已添加用户习惯短句「收尾一下」……
user: 停
assistant: 当前这个方向先停。
This skill does not auto-save habits during scan-only flows. It does not execute downstream workflow actions. It forwards current-thread context to the backend, and the user still explicitly confirms durable changes.
- user-habit-pipeline backend
- user-habit-pipeline-codex-demo
- INSTALL-LIFECYCLE-CHECKLIST.md
- RELEASE-CHECKLIST.md
- RELEASE-RUNBOOK.md
- bootstrap-install.sh
- bootstrap-install.ps1
- install.sh
- install.ps1
- uninstall.sh
- uninstall.ps1
- SKILL.md
- scripts/check-install.sh
- scripts/install-skill.ps1
- scripts/check-install.ps1
- scripts/invoke-backend.sh
