Skip to content

sidiangongyuan/codex-skills-library / skills/feishu-paper-reading

feishu-paper-reading

Verified

Search, screen, deeply read, synthesize, and publish recent research papers for a user-specified topic, window, count, quality/attention balance, and language. Use for evidence-anchored literature digests, cross-paper comparisons, original-language excerpts, Chinese explanations, guided Feishu setup, or Feishu research reports.

scripts/feishu_process_environment.py

View on GitHub
#!/usr/bin/env python3
"""Build a minimal environment for pinned Feishu/Lark CLI child processes."""

from __future__ import annotations

import os
from collections.abc import Mapping


SAFE_BASE_ENVIRONMENT_VARIABLES = frozenset(
    {
        "APPDATA",
        "COMSPEC",
        "DBUS_SESSION_BUS_ADDRESS",
        "DISPLAY",
        "GNOME_KEYRING_CONTROL",
        "HOME",
        "HOMEDRIVE",
        "HOMEPATH",
        "LANG",
        "LC_ALL",
        "LOCALAPPDATA",
        "PATH",
        "PATHEXT",
        "SYSTEMROOT",
        "TEMP",
        "TMP",
        "TMPDIR",
        "USERPROFILE",
        "WAYLAND_DISPLAY",
        "WINDIR",
        "XDG_RUNTIME_DIR",
    }
)


def build_isolated_cli_environment(
    *,
    config_dir: str | None = None,
    data_dir: str | None = None,
    base_environment: Mapping[str, str] | None = None,
) -> dict[str, str]:
    """Retain only OS/runtime essentials and explicitly selected CLI stores."""

    source = os.environ if base_environment is None else base_environment
    environment = {
        key: value
        for key, value in source.items()
        if isinstance(key, str)
        and isinstance(value, str)
        and key.upper() in SAFE_BASE_ENVIRONMENT_VARIABLES
    }
    if config_dir is not None:
        environment["LARKSUITE_CLI_CONFIG_DIR"] = config_dir
    if data_dir is not None:
        if config_dir is None:
            raise ValueError("data_dir requires config_dir")
        environment["LARKSUITE_CLI_DATA_DIR"] = data_dir
    return environment
add-product-e2e-evalpaperclipai/paperclipAdd or extend a Paperclip full-stack runner E2E workflow, fixture, matcher, or report evidence path for local or Daytona execution.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
add-runner-evalpaperclipai/paperclipAdd or extend a Paperclip Runner protocol evaluation definition, roster, assertion, or report fixture with provenance and narrow validation.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
diagnose-why-work-stoppedpaperclipai/paperclipCompatibility entry point for failed, stalled, looping, or over-recovered Paperclip work. Use fix-failed-paperclip-run for the full diagnosis, regression, repair, real verification, and green-PR workflow; honor an explicitly requested diagnosis-only scope.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
fix-failed-paperclip-runpaperclipai/paperclipDiagnose and fix failed, stuck, slow, or incorrectly blocked Paperclip tasks and runs. Use with a task/run URL or failure report to trace the root cause, prove a regression red then green, check second-order effects, verify the real workflow, and deliver a PR with passing checks.Stars: 115kUpdated Claude CodeCodexVerifiedInstall