GitHub Copilot Chat Assistant
PRs desde aquí, pero preparé un script que hace TODO en tu máquina: crea los archivos (scaffold), genera las 66 entradas (.md + .json), crea la rama, commitea, hace push y crea el PR usando gh CLI. Revisa el script antes de ejecutarlo y asegúrate de estar en la raíz del repo clonado (navarretejoel115-sys/mi-repo) y de tener git, Node.js, pnpm y gh instalados y autenticados.
Copia este archivo como create_scaffold.sh, dale permisos y ejecútalo.
=== create_scaffold.sh === #!/usr/bin/env bash set -euo pipefail
REPO="navarretejoel115-sys/mi-repo" BRANCH="feat/navarrete115-biblioteca-scaffold" BASE="main" PR_TITLE="feat: NAVARRETE115-biblioteca scaffold" PR_BODY="Scaffold: pnpm workspace, packages/library (TS), packages/devotionals (66), CI/workflows, dependabot, husky, README.md"
command -v git >/dev/null 2>&1 || { echo "git no está instalado"; exit 1; } command -v node >/dev/null 2>&1 || { echo "node no está instalado"; exit 1; } command -v gh >/dev/null 2>&1 || { echo "gh CLI no está instalado o no autenticado"; exit 1; }
echo "Usando repo: $REPO" echo "Branch: $BRANCH, base: $BASE"
if [ ! -d .git ]; then echo "No veo un .git en el directorio actual. Clona el repo e intenta de nuevo." echo "git clone git@github.com:$REPO.git" exit 1 fi
git fetch origin git checkout -B "$BRANCH"
mkdir -p packages/library/src mkdir -p packages/devotionals/content mkdir -p .husky mkdir -p .github/workflows mkdir -p scripts
cat > package.json <<'EOF' { "name": "navarrete115-biblioteca", "private": true, "version": "0.0.0", "workspaces": [ "packages/" ], "scripts": { "dev": "pnpm -w run dev", "build": "pnpm -w run build", "lint": "pnpm -w run lint", "test": "pnpm -w run test", "prepare": "husky install" }, "devDependencies": { "eslint": "^8.50.0", "prettier": "^3.0.0", "husky": "^8.0.0", "lint-staged": "^14.0.0", "typescript": "^5.5.0", "pnpm": "^8.0.0" }, "lint-staged": { ".{ts,js,json,md}": [ "prettier --write", "git add" ] } } EOF
cat > pnpm-workspace.yaml <<'EOF' packages:
- 'packages/*' EOF
cat > .gitignore <<'EOF' node_modules .pnp .pnp.js dist coverage .env .env..local .vscode .DS_Store packages//node_modules packages/*/dist .env.local EOF
cat > .prettierrc <<'EOF' { "trailingComma": "all", "tabWidth": 2, "printWidth": 100, "singleQuote": true, "endOfLine": "lf" } EOF
cat > .eslintrc.cjs <<'EOF' module.exports = { root: true, env: { node: true, es2021: true }, extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint'], rules: {} }; EOF
cat > .husky/pre-commit <<'EOF' #!/usr/bin/env sh . "$(dirname "$0")/_/husky.sh"
pnpm lint-staged EOF chmod +x .husky/pre-commit
cat > README.md <<'EOF'
Este repositorio contiene un scaffold para:
- pnpm workspace
- packages/library (TypeScript)
- packages/devotionals (66 entradas, .md + .json, resúmenes basados en Reina Valera 2011)
- CI/workflows (lint/test/build + deploy placeholder a Cloudflare R2)
- Dependabot config
- Husky + lint-staged
- README.md y PRIVACY.md (en español)
Requisitos previos
- Node.js 18+ (o 20 recomendado)
- pnpm
- gh (GitHub CLI) si quieres crear el PR desde la terminal
- Añadir secrets en Settings → Secrets and variables → Actions (ver más abajo)
Cómo usar (rápido)
-
Instalar dependencias: pnpm install
-
Generar las 66 entradas (si aún no están en el repo): node scripts/generate-devotionals.js
-
Ejecutar linters: pnpm lint
-
Construir: pnpm build
Secrets necesarios (Settings → Secrets and variables → Actions)
- CF_ACCOUNT_ID
- CF_API_TOKEN
- R2_BUCKET (Opcional para compat S3) CF_R2_ACCESS_KEY_ID, CF_R2_SECRET_ACCESS_KEY (para publicar paquetes) NPM_TOKEN (para acciones) GH_TOKEN si es necesario
Notas sobre contenido
- Las entradas de devocionales incluyen resúmenes y referencias basados en Reina Valera 2011 (sólo resúmenes para evitar problemas de copyright). Si tienes permiso para publicar texto completo, indícamelo específicamente.
- Código: licencia MIT. Contenido (textos/audio/video) — por defecto CC BY-SA 4.0 (puedes cambiarlo).
Contribuir
- Usa husky y lint-staged para formateo/linters.
- Abrir PRs hacia la rama
main(o la base que uses). EOF
cat > PRIVACY.md <<'EOF'
Este repositorio contiene contenido generado por el equipo y por herramientas automáticas. No recogemos datos de usuarios por defecto.
Servicios de terceros
- El proyecto puede integrar servicios de terceros como Google Translate y Cloudflare R2. Si el proyecto utiliza estos servicios, los datos enviados a dichos servicios estarán sujetos a las políticas y términos de esos proveedores. Asegúrate de revisar las políticas de privacidad y términos de uso de cada servicio antes de utilizarlo.
Datos y telemetría
- No recopilamos ni almacenamos datos personales de los usuarios por defecto.
- Si en el futuro se habilita funcionalidad que recopila datos (por ejemplo, geolocalización para encontrar iglesias), se documentará y requerirá el consentimiento explícito del usuario.
Secrets y credenciales
- No coloques secretos en el código. Usa GitHub Secrets (Settings → Secrets and variables → Actions) para almacenar CF_ACCOUNT_ID, CF_API_TOKEN, R2_BUCKET y otros secretos necesarios.
Contacto
- Para preguntas sobre privacidad del proyecto, contacta al mantenedor del repositorio. EOF
cat > LICENSE <<'EOF' MIT License
Copyright (c) 2026 navarretejoel115-sys
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. EOF
cat > packages/library/package.json <<'EOF' { "name": "@navarrete115/library", "version": "0.1.0", "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { "build": "tsc -p tsconfig.json", "dev": "ts-node src/index.ts", "lint": "eslint "src/**/*.{ts,js}" --fix", "test": "echo "No tests yet"" }, "dependencies": { "got": "^12.0.0" }, "devDependencies": { "ts-node": "^10.0.0", "typescript": "^5.5.0", "@types/node": "^20.0.0" } } EOF
cat > packages/library/tsconfig.json <<'EOF' { "compilerOptions": { "target": "es2020", "module": "commonjs", "declaration": true, "outDir": "dist", "strict": true, "esModuleInterop": true, "skipLibCheck": true }, "include": ["src"] } EOF
cat > packages/library/src/index.ts <<'EOF' export const hello = () => { return 'Hola desde @navarrete115/library'; }; EOF
cat > packages/library/src/translate.ts <<'EOF' /**
- Wrapper placeholder para traducciones (Google Translate).
- Implementación mínima: devuelve el texto original. Documenta cómo integrar. */ export async function translateText(text: string,): Promise { return text; } EOF
cat > packages/library/src/tts.ts <<'EOF' /**
- Wrapper placeholder para gTTS (Text-to-Speech).
- Crea un archivo vacío como placeholder. */ import fs from 'fs'; import path from 'path';
export async function synthesizeToMp3(text: string, outFile = 'output.mp3'): Promise { const outPath = path.resolve(process.cwd(), outFile); fs.writeFileSync(outPath, '', 'utf-8'); return outPath; } EOF
cat > packages/devotionals/package.json <<'EOF' { "name": "@navarrete115/devotionals", "version": "0.1.0", "private": true, "scripts": { "build": "echo "Devotionals package — no build step"", "lint": "echo "no lint"" } } EOF
cat > packages/devotionals/README.md <<'EOF'
Contiene 66 entradas de devocionales (resúmenes + metadata). Cada entrada tiene:
- un archivo .md con frontmatter (idioma: es)
- un archivo .json con la misma metadata en forma estructurada
Para generar/actualizar las 66 entradas usa el script: node ../../scripts/generate-devotionals.js EOF
cat > scripts/generate-devotionals.js <<'EOF' const fs = require('fs'); const path = require('path');
const outDir = path.join(__dirname, '..', 'packages', 'devotionals', 'content'); if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true });
function slugify(n) {
return devotional-${String(n).padStart(2, '0')};
}
for (let i = 1; i <= 66; i++) {
const id = i;
const slug = slugify(i);
const title = Devocional ${i};
const date = new Date().toISOString().split('T')[0];
const md = `---
id: ${id}
title: "$ {title}"
language: "es"
date: "${date}"
author: "Autor"
summary: "Resumen breve del devocional ${i} basado en el libro correspondiente (Reina Valera 2011). Sustituye por el contenido definitivo."
Resumen: Contenido de ejemplo (resumen) para el devocional ${i}. Sustituye este texto por el contenido real.`;
const json = {
id,
slug,
title,
language: 'es',
date,
author: 'Autor',
summary: Resumen breve del devocional ${i} basado en Reina Valera 2011.,
content: Contenido de ejemplo (resumen) para el devocional ${i}. Sustituye este texto por el contenido real.
};
const mdPath = path.join(outDir, ${String(i).padStart(2, '0')}-${slug}.md);
const jsonPath = path.join(outDir, ${String(i).padStart(2, '0')}-${slug}.json);
fs.writeFileSync(mdPath, md, 'utf-8'); fs.writeFileSync(jsonPath, JSON.stringify(json, null, 2), 'utf-8'); }
console.log('66 devocionales generados en', outDir); EOF
id: 1 title: "Devocional 1" language: "es" date: "$(date +%F)" author: "Autor" summary: "Resumen breve del devocional 1 basado en Reina Valera 2011. Sustituye por contenido definitivo."
Resumen: Contenido de ejemplo (resumen) para el devocional 1. Sustituye este texto por el contenido real. EOF
cat > packages/devotionals/content/01-devotional-01.json <<'EOF' { "id": 1, "slug": "devotional-01", "title": "Devocional 1", "language": "es", "date": "$(date +%F)", "author": "Autor", "summary": "Resumen breve del devocional 1 basado en Reina Valera 2011. Sustituye por contenido definitivo.", "content": "Contenido de ejemplo (resumen) para el devocional 1. Sustituye este texto por el contenido real." } EOF
cat > .github/dependabot.yml <<'EOF' version: 2 updates:
- package-ecosystem: "npm" directory: "/" schedule: interval: "weekly"
- package-ecosystem: "npm" directory: "/packages/library" schedule: interval: "weekly" EOF
cat > .github/workflows/ci.yml <<'EOF' name: CI
on: push: branches: [ main ] pull_request: branches: [ main ]
jobs: setup: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v4 with: node-version: '20' cache: 'pnpm' - name: Setup pnpm run: npm i -g pnpm
lint-and-test: needs: setup runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v4 with: node-version: '20' - name: Install run: pnpm install - name: Lint run: pnpm lint - name: Build run: pnpm build EOF
cat > .github/workflows/deploy-r2.yml <<'EOF' name: Deploy to Cloudflare R2 (placeholder)
on: push: branches: - main
jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v4 with: node-version: '20' - name: Install run: pnpm install - name: Build run: pnpm build - name: Prepare artifacts run: | mkdir -p artifacts cp -R packages/devotionals/content artifacts/devotionals
deploy-to-r2:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Upload artifacts to R2 (placeholder)
env:
CF_ACCOUNT_ID:
node scripts/generate-devotionals.js
git add . git commit -m "feat: NAVARRETE115-biblioteca scaffold" || true
git push --set-upstream origin "$BRANCH"
gh pr create --repo "$REPO" --base "$BASE" --head "$(git rev-parse --abbrev-ref HEAD)" --title "$PR_TITLE" --body "$PR_BODY"
echo "He creado la rama, hecho push y solicitado la creación del PR (si gh CLI está autenticado). Revisa el PR en GitHub." EOF
Instrucciones para ejecutar
- Guarda create_scaffold.sh en la raíz del repo clonado.
- Hazlo ejecutable: chmod +x create_scaffold.sh
- Ejecuta: ./create_scaffold.sh
Notas importantes antes de ejecutar
- Revisa el script. Tiene operaciones de git (checkout -B), sobrescribirá/añadirá archivos en el working tree.
- Asegúrate de que el remote origin apunte a git@github.com:navarretejoel115-sys/mi-repo.git o ajusta REPO en el script.
- gh CLI debe estar autenticado y tener permisos para crear PRs en el repo.
- El script crea resúmenes (no textos bíblicos completos) para evitar problemas de copyright.
- Después de ejecutar, revisa la PR en GitHub y agrega secrets (CF_ACCOUNT_ID, CF_API_TOKEN, R2_BUCKET) en Settings → Secrets if you plan to run workflows that deploy.
¿Quieres que modifique el script para:
- No sobrescribir archivos existentes si existen (modo safer)?
- Crear un commit único o varios commits por carpeta?
- Generar también archivos multimedia (audio) automáticamente en CI (añado workflow)?
Dime qué prefieres y lo ajusto. https://prompts.chat/
from openai.types import ( AllModels, ChatModel, ComparisonFilter, CompoundFilter, CustomToolInputFormato FunctionDefinition, FunctionParameters, Metadata, Reasoning, ReasoningEffort, ResponseFormatJSONObject, ResponseFormatJSONSchema, ResponseFormatText, ResponseFormatTextGrammar, ResponseFormatTextPython, ResponsesModel, ) This project contains some ChatGPT prompts that works well.
i want you to act as a linux terminal. I will type commands and you will reply with what the terminal should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. do not write explanations. do not type commands unless I instruct you to do so. when i need to tell you something in english, i will do so by putting text inside curly brackets {like this}. my first command is pwd
Translator and Improver
Alternative to: Grammarly, Google Translate
I want you to act as an English translator, spelling corrector and improver. I will speak to you in any language and you will detect the language, translate it and answer in the corrected and improved version of my text, in English. I want you to replace my simplified A0-level words and sentences with more beautiful and elegant, upper level English words and sentences. Keep the meaning same, but make them more literary. I want you to only reply the correction, the improvements and nothing else, do not write explanations. My first sentence is "istanbulu cok seviyom burada olmak cok guzel"
Examples: Node.js Backend Developer, React Frontend Developer, Full Stack Developer, iOS Developer etc.
I want you to act as an interviewer. I will be the candidate and you will ask me the interview questions for the
positionposition. I want you to only reply as the interviewer. Do not write all the conservation at once. I want you to only do the interview with me. Ask me the questions and wait for my answers. Do not write explanations. Ask me the questions one by one like an interviewer does and wait for my answers. My first sentence is "Hi"fue
I want you to act as a javascript console. I will type commands and you will reply with what the javascript console should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. do not write explanations. do not type commands unless I instruct you to do so. when i need to tell you something in english, i will do so by putting text inside curly brackets {like this}. my first command is console.log("Hello World");
I want you to act as an English pronunciation assistant for Turkish speaking people. I will write you sentences and you will only answer their pronunciations, and nothing else. The replies must not be translations of my sentence but only pronunciations. Pronunciations should use Turkish Latin letters for phonetics. Do not write explanations on replies. My first sentence is "how the weather is in Istanbul?"
I want you to act as a travel guide. I will write you my location and you will suggest a place to visit near my location. In some cases, I will also give you the type of places I will visit. You will also suggest me places of similar type that are close to my first location. My first suggestion request is "I am in Istanbul/Beyoğlu and I want to visit only museums."
-
name: Use Node.js 18 uses: actions/setup-node@v4 with: node-version: '18' cache: 'npm'
-
name: Install dependencies run: npm ci
-
name: Lint run: npm run lint --if-present
-
name: Run tests run: npm test --if-present
-
name: Build run: npm run build --if-present
-
name: Upload build artifact uses: actions/upload-artifact@v4 with: name: build path: ./build # ajusta según tu carpeta de salida (p. ej. build, public, .svelte-kit)
-
git clone git@github.com:navarretejoel115-sys/navarretejoel115-sys-mi-biblioteca--chatgpt-prompts.git cd navarretejoel115-sys-mi-biblioteca--chatgpt-prompts
Perfecto — vamos a aplicar todo localmente. Sigue los pasos exactamente y, si algo falla, copia/pega aquí las salidas (logs) que te indico para ayudarte a depurar.
Antes de empezar: asegúrate de tener en tu máquina
- git, Node.js (>=18), pnpm, gh (opcional), ffmpeg instalado.
- Autenticación gh si vas a crear PR con gh: gh auth login
-
Clona el repo (si aún no lo hiciste) git clone git@github.com:navarretejoel115-sys/navarretejoel115-sys-mi-biblioteca--chatgpt-prompts.git cd navarretejoel115-sys-mi-biblioteca--chatgpt-prompts
-
Opción A — si tienes apply_scaffold.patch (recomendado)
- Guarda el archivo apply_scaffold.patch en la raíz del repo.
- Aplica el patch: git apply apply_scaffold.patch || git apply --whitespace=fix apply_scaffold.patch
- Revisa cambios: git status
- Añade y commitea: git add . git commit -m "feat: add media pipeline, translate/tts, workflow and content license"
- Crea la rama y haz push: git checkout -b feat/navarrete115-biblioteca-scaffold git push --set-upstream origin feat/navarrete115-biblioteca-scaffold
- (Opcional) Crea PR con gh: gh pr create --repo navarretejoel115-sys/navarretejoel115-sys-mi-biblioteca--chatgpt-prompts --base main --head navarretejoel115-sys:feat/navarrete115-biblioteca-scaffold --title "feat: NAVARRETE115-biblioteca scaffold + media pipeline" --body "Scaffold + media pipeline + CC BY-SA license"
- Opción B — si prefieres ejecutar el script safe (si existe create_scaffold.sh)
- Haz ejecutable y ejecútalo: chmod +x create_scaffold.sh ./create_scaffold.sh
- Instala dependencias y herramientas locales
- Instala pnpm y deps: npm i -g pnpm pnpm install -w pnpm add -w gtts node-fetch
- Instala ffmpeg (ejemplo en Ubuntu): sudo apt update && sudo apt install -y ffmpeg
- Genera y prueba localmente (haz pruebas pequeñas primero)
- Generar los devocionales (si no están): node scripts/generate-devotionals.js
- Probar la generación de media para 3 entradas: node scripts/generate_media.js 3
- Comprueba artifacts/ contiene .mp3, .srt, .mp4
- Si algo falla localmente — qué pegar aquí Para errores en comandos locales (por ejemplo node o ffmpeg), pega:
- El comando exacto que ejecutaste.
- Las últimas ~80 líneas completas de la salida de la terminal (incluyendo el mensaje de error). Ejemplo: pega el output de: node scripts/generate_media.js 3 o git apply apply_scaffold.patch
- Si falla en GitHub Actions — cómo traer logs
- Lista runs: gh run list --repo navarretejoel115-sys/navarretejoel115-sys-mi-biblioteca--chatgpt-prompts
- Ver logs (sustituye RUN_ID): gh run view RUN_ID --repo navarretejoel115-sys/navarretejoel115-sys-mi-biblioteca--chatgpt-prompts --log
- Pega aquí:
- URL del run o RUN_ID
- Nombre del step que falló
- Últimas ~50 líneas del log del step (sin secrets)
- Comprobaciones rápidas (por si fallan cosas frecuentes)
- gh no autenticado: gh auth login
- ffmpeg no encontrado: sudo apt install -y ffmpeg (o ver PATH)
- gtts falta: pnpm add -w gtts
- aws-cli falta en workflow: Actions instala awscli via pip en el workflow (ya incluido)
- R2 upload AccessDenied: revisa CF_R2_ACCESS_KEY_ID / SECRET y R2_ENDPOINT
Dime ahora:
- Confirmas que vas a usar Opción A (apply_scaffold.patch) o B (create_scaffold.sh)?
- Si empiezas ahora, ejecuta los pasos y, si aparece un error, pega aquí la salida del comando/step que falló (siguiendo lo indicado) y lo depuramos juntos.
✔️ confirmando