sha256:73c65f5e7a350b6869f10d8e07893a4eb36b336eb29c572ab707380329c32222
Last pushed
about 1 month by mateuszsjs
Type
Sandbox Kit
Manifest digest
sha256:73c65f5e7a350b6869f10d8e07893a4eb36b336eb29c572ab707380329c32222
schemaVersion: "2"
kind: mixin
name: codex-code-intelligence
version: 0.1.0
displayName: Codex Code Intelligence
description: Adds Context7 documentation and codebase-memory graph tools to Codex sandboxes.
requires:
agent: codex
agentInstructions:
content: |
Use Context7 whenever current library, framework, SDK, API, or configuration
documentation would improve the answer. Resolve the library identifier first,
then query its documentation with a focused, version-aware question.
Prefer codebase-memory graph tools over filesystem search when exploring code:
1. `search_graph` to find functions, classes, routes, and variables.
2. `trace_path` to inspect callers and callees.
3. `get_code_snippet` to read specific symbols.
4. `query_graph` for complex structural questions.
5. `get_architecture` for a high-level project summary.
If the project is not indexed or the graph is stale, use `index_repository`,
`index_status`, or `detect_changes` as appropriate. Fall back to `rg` or direct
file reads for string literals, error messages, configuration, non-code files,
or when graph coverage is insufficient.
permissions:
network:
allow:
- mcp.context7.com
- github.com
- api.github.com
- release-assets.githubusercontent.com
- objects.githubusercontent.com
credentials:
- service: context7
description: Optional Context7 API key for higher rate limits and private repositories.
apiKey:
name: CONTEXT7_API_KEY
inject:
- domain: mcp.context7.com
header: Authorization
format: Bearer %s
setup:
install:
- command: |
set -eu
CBM_VERSION="0.6.1"
CHECKSUMS_SHA256="eb74e48daa9af6dc38a9aecdb6b3eb2e878bdb3781201e758f7f037d19683bac"
DESTINATION="/usr/local/bin/codebase-memory-mcp"
if [ -x "$DESTINATION" ] &&
[ "$("$DESTINATION" --version 2>/dev/null)" = "codebase-memory-mcp ${CBM_VERSION}" ]; then
exit 0
fi
case "$(uname -m)" in
x86_64|amd64)
CBM_ARCH="amd64"
;;
aarch64|arm64)
CBM_ARCH="arm64"
;;
*)
echo "unsupported sandbox architecture: $(uname -m)" >&2
exit 1
;;
esac
ASSET="codebase-memory-mcp-linux-${CBM_ARCH}-portable.tar.gz"
RELEASE_URL="https://github.com/DeusData/codebase-memory-mcp/releases/download/v${CBM_VERSION}"
DOWNLOAD_DIR="$(mktemp -d)"
trap 'rm -rf "$DOWNLOAD_DIR"' EXIT
curl --proto '=https' --tlsv1.2 -fsSL --retry 3 \
"${RELEASE_URL}/checksums.txt" -o "${DOWNLOAD_DIR}/checksums.txt"
echo "${CHECKSUMS_SHA256} ${DOWNLOAD_DIR}/checksums.txt" | sha256sum -c -
EXPECTED_SHA256="$(
awk -v asset="$ASSET" '$2 == asset || $2 == "*" asset { print $1 }' \
"${DOWNLOAD_DIR}/checksums.txt"
)"
if [ "${#EXPECTED_SHA256}" -ne 64 ] ||
! printf '%s\n' "$EXPECTED_SHA256" | grep -Eq '^[0-9a-fA-F]{64}$'; then
echo "release checksum is missing or invalid for ${ASSET}" >&2
exit 1
fi
curl --proto '=https' --tlsv1.2 -fsSL --retry 3 \
"${RELEASE_URL}/${ASSET}" -o "${DOWNLOAD_DIR}/${ASSET}"
echo "${EXPECTED_SHA256} ${DOWNLOAD_DIR}/${ASSET}" | sha256sum -c -
mkdir "${DOWNLOAD_DIR}/extract"
tar -xzf "${DOWNLOAD_DIR}/${ASSET}" \
-C "${DOWNLOAD_DIR}/extract" codebase-memory-mcp
test -f "${DOWNLOAD_DIR}/extract/codebase-memory-mcp"
test ! -L "${DOWNLOAD_DIR}/extract/codebase-memory-mcp"
install -m 0755 "${DOWNLOAD_DIR}/extract/codebase-memory-mcp" "$DESTINATION"
test "$("$DESTINATION" --version)" = "codebase-memory-mcp ${CBM_VERSION}"
user: "0"
description: Install checksum-verified codebase-memory-mcp 0.6.1
- command: |
set -eu
if ! codex mcp get context7 >/dev/null 2>&1; then
codex mcp add context7 --url https://mcp.context7.com/mcp
fi
if ! codex mcp get codebase-memory-mcp >/dev/null 2>&1; then
codex mcp add codebase-memory-mcp -- /usr/local/bin/codebase-memory-mcp
fi
/usr/local/bin/codebase-memory-mcp config set auto_index true
user: "1000"
description: Register Context7 and codebase-memory with Codex