Skip to content

pingzi-crypto/manage-current-session-habits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

manage-current-session-habits

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.

README short demo

Related entrypoints:

This repository is the thin Codex app bridge for user habit memory, current-session phrase scanning, and in-thread confirmation of repeated user shorthand.

Quick Start

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, and node
  • macOS / Linux: git, bash, and node

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
& $bootstrap

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"

If you prefer to inspect the repository first, use the manual path:

  1. Clone this repository.
  2. Make sure your platform prerequisites are available on PATH.
  3. Run:
# Windows
./install.ps1
# macOS / Linux
bash ./install.sh
  1. 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-starter

That 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-pipeline

If 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-only

To remove the installed skill link and generated local runtime files:

# Windows
./uninstall.ps1
# macOS / Linux
bash ./uninstall.sh

This removes:

  • the Codex skill link pointing at this repository
  • config/local-config.json
  • config/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-only

If 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-backend

Cross-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.

What It Does

  • 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-habits contract instead of inventing a separate host protocol

Search-Friendly Use Cases

  • 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: 当前这个方向先停。

Product Boundary

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.

More Details

About

Codex skill for scanning current-thread habit candidates on top of the user-habit-pipeline backend.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors