agentleFS
bxmaximumbxmaximum/bitrix-framework-skills/skills/bitrix-request-response/SKILL.md

bitrix-request-response

Skill73 starsChanged 25 days agoMITView on GitHub

Используй для HTTP-ввода и ответов Битрикса: Context, HttpRequest, JSON-тело, HttpResponse, cookies, перенаправления и файлы. Вместо $_GET/$_POST, header() и json_encode().

The file

Files
SKILL.md

Приложение, контекст, запрос и ответ

Baseline: main 23.0+ · Verified: main 26.1000.0

Перед PHP-кодом прочитай bitrix-framework, если ещё не читал его в этой задаче. В таблице выбери только нужный rules/*.md; пути относительны каталогу скилла.

ЗадачаЧитать
Application, Context, сайт, язык, доступ к сессииrules/application-context.md
Строка запроса, форма, заголовки, cookies, файлы и тело JSONrules/request.md
HttpResponse, Json/AjaxJson, перенаправления, файлы, cookies, Converterrules/response.md
Uri, UuidGeneratorrules/uri-uuid.md

Обязательные правила

  • Читай данные запроса через $this->getRequest() в контроллере или Context::getCurrent()->getRequest(). Не используй $_GET/$_POST/$_COOKIE/$_SERVER.
  • Выбирай метод конкретного источника (getQuery/getPost/getHeader/getCookie). get() объединяет только строку запроса и форму.
  • Тело JSON не входит в get()/getPost(); параметры действия привязываются к нему только в JsonController. Используй getJsonList() или JsonPayload.
  • Отфильтрованные значения ($request['x']) не экранированы: приводи типы, проверяй и экранируй при выводе.
  • Возвращай объекты ответа (HttpResponse, Engine\Response\*), не header()/echo json_encode().

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.