Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By nsheapsv1.0.5In 1 marketplace
Shared bash libraries for logging, hook output and config reading that other ai-mktpl plugins source at runtime. A sync hook copies them into the data directory at init and each session start, so the marketplace must stay named ai-mktpl.
Trending plugins
7-day copy clicks
Run automatically on Claude Code events. Claude doesn't decide.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Internal infrastructure plugin: bundles bash helper libraries used by other plugins in this marketplace.
Many plugins in nsheaps/ai-mktpl share the same bash helpers
(log.sh, hook-logging.sh, plugin-config-read.sh, etc.). Historically
these were file-level symlinks from each plugin's lib/ to the repo's
shared/lib/. After Claude Code v2.1.117 (upstream
issue), symlinks are
no longer preserved when plugins are copied to the cache, so every plugin's
source "$CLAUDE_PLUGIN_ROOT/lib/foo.sh" started failing.
This plugin is the fix:
The libraries live here, in plugins/shared-lib/lib/*.sh.
The sync script is registered on two hook events:
Setup{matcher:"init"} — fires during the claude --init-only
pre-pass (the launcher's fresh-install Phase 1). This guarantees
the libs are on disk before any dependent plugin's
SessionStart body runs in the interactive session.SessionStart{matcher:"*"} — fires every session. Catches plugin
updates (Setup{init} does not re-fire when a plugin version
bumps) and self-heals if the data dir is manually deleted.Both triggers point at the same script. A manifest-hash check makes repeat invocations a fast no-op when content is unchanged.
Other plugins declare a dependency on shared-lib in their
plugin.json, then source the libs out of the shared-lib data
directory (with a wait-and-source guard as defense-in-depth — see
below).
See docs/research/claude-maintenance-flag-verification.md
(in the nsheaps/.ai-agent-jack repo) for the launcher-contract
analysis on --init-only semantics and what carries over between the
pre-pass and the interactive session.
In each dependent plugin's .claude-plugin/plugin.json:
{
"name": "your-plugin",
"version": "x.y.z",
"dependencies": [{ "name": "shared-lib", "version": "^1.0" }]
}
In each dependent hook script, replace any source "${CLAUDE_PLUGIN_ROOT}/lib/foo.sh" with the wait-and-source pattern:
PLUGIN_NAME="your-plugin"
if [ -n "${CLAUDE_PLUGIN_DATA:-}" ]; then
SHARED_LIB_DIR="${CLAUDE_PLUGIN_DATA%/*}/shared-lib-ai-mktpl/lib"
else
# Fallback for when this script is invoked outside a Claude Code hook.
SHARED_LIB_DIR="${HOME}/.claude/plugins/data/shared-lib-ai-mktpl/lib"
fi
# Wait up to ~10s for shared-lib's SessionStart copy.
_wait_for_shared_lib() {
local lib="$1"
local i=0
while [ ! -f "$SHARED_LIB_DIR/$lib" ]; do
i=$((i + 1))
if [ "$i" -ge 20 ]; then
echo "[$PLUGIN_NAME] timed out waiting for $SHARED_LIB_DIR/$lib (shared-lib SessionStart copy)" >&2
exit 1
fi
sleep 0.5
done
}
_wait_for_shared_lib "log.sh"
source "$SHARED_LIB_DIR/log.sh"
The path expression ${CLAUDE_PLUGIN_DATA%/*}/shared-lib-ai-mktpl/lib
strips the dependent plugin's own data-dir name and rebuilds the path to
shared-lib's data dir. (Plugin data dir IDs are deterministic:
{plugin-name}-{marketplace-name} per the
plugins reference.)
The hardcoded shared-lib-ai-mktpl suffix in the path above means this
marketplace must be installed under the canonical name ai-mktpl for
dependent plugins to resolve shared-lib's data dir.
Claude Code lets users alias a marketplace at install time:
# WRONG — aliasing breaks shared-lib resolution:
claude plugin marketplace add nsheaps/ai-mktpl --name nsheaps-ai
# CORRECT — keep the default name:
claude plugin marketplace add nsheaps/ai-mktpl
If you alias to anything other than ai-mktpl, every dependent plugin's
_wait_for_shared_lib guard will time out after 10s because the
hardcoded path expression won't resolve to the actual data dir.
This constraint is repeated in .claude/rules/shared-libs.md and in the
bootstrap stanza of every dependent plugin (23 sites today). A future
refactor (tracked as a follow-up) may derive the marketplace suffix from
CLAUDE_PLUGIN_DATA instead of hardcoding it.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub nsheaps/ai-mktpl --plugin shared-libPlugins from other owners that cover similar ground