jinko-sdk-setup
Jinkō SDK Setup
Use this skill for SDK setup and credential checks only. Keep the user focused on proving that Python can authenticate against Jinkō and read one project item list before moving to model, vpop, protocol, output-set, or trial workflows.
BE CAREFUL: the right package is jinko-sdk that export a jinko module. jinko is a different package unrelated to the Jinko SDK.
Credentials
Do this before the connection check. JinkoClient() reads credentials from the environment only. The SDK commands (python -m jinko.cli.*) also load a local .env when python-dotenv is installed, except create_document_from_markdown. python-dotenv is not a dependency of jinko-sdk. For that command or your own script, export the variables of .env first (set -a; source .env; set +a), or install python-dotenv and call from dotenv import load_dotenv; load_dotenv() before JinkoClient().
Choose the credential
- If
JINKO_API_KEYis set in the environment or.env, use it. Do not callget_session_code. An API key serves every SDK process for the whole session, so it needs no per-command approval. - Use a session code only when no
JINKO_API_KEYis available and a Jinko MCP server exposesget_session_code. - If neither is available, ask the user to add
JINKO_API_KEYto.env(seeassets/.env.example). Do not ask the user to paste a key into chat.
When both JINKO_API_KEY and JINKO_SESSION_CODE are set, the SDK uses the session code. Do not export a session code when an API key is available.